Skip to content

Commit 0f6f73e

Browse files
authored
[red-knot] Require that FileSystem objects implement Debug (#12204)
1 parent 7910bee commit 0f6f73e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/ruff_db/src/file_system.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub type Result<T> = std::io::Result<T>;
2121
/// * Accessing unsaved or even untitled files in the LSP use case
2222
/// * Testing with an in-memory file system
2323
/// * Running Ruff in a WASM environment without needing to stub out the full `std::fs` API.
24-
pub trait FileSystem {
24+
pub trait FileSystem: std::fmt::Debug {
2525
/// Reads the metadata of the file or directory at `path`.
2626
fn metadata(&self, path: &FileSystemPath) -> Result<Metadata>;
2727

crates/ruff_db/src/file_system/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use filetime::FileTime;
22

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

5-
#[derive(Default)]
5+
#[derive(Default, Debug)]
66
pub struct OsFileSystem;
77

88
impl OsFileSystem {

0 commit comments

Comments
 (0)