Skip to content

Commit

Permalink
[red-knot] Require that FileSystem objects implement Debug (#12204)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Jul 5, 2024
1 parent 7910bee commit 0f6f73e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 0f6f73e

Please sign in to comment.