Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[red-knot] Require that FileSystem objects implement Debug #12204

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ruff_db/src/file_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub type Result<T> = std::io::Result<T>;
/// * Accessing unsaved or even untitled files in the LSP use case
/// * Testing with an in-memory file system
/// * Running Ruff in a WASM environment without needing to stub out the full `std::fs` API.
pub trait FileSystem {
pub trait FileSystem: std::fmt::Debug {
/// Reads the metadata of the file or directory at `path`.
fn metadata(&self, path: &FileSystemPath) -> Result<Metadata>;

Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_db/src/file_system/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use filetime::FileTime;

use crate::file_system::{FileSystem, FileSystemPath, FileType, Metadata, Result};

#[derive(Default)]
#[derive(Default, Debug)]
pub struct OsFileSystem;

impl OsFileSystem {
Expand Down
Loading