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

This commit is contained in:
Alex Waygood 2024-07-05 12:53:30 +01:00 committed by GitHub
parent 7910beecc4
commit 0f6f73ecf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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>;

View file

@ -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 {