mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
[red-knot] Require that FileSystem objects implement Debug (#12204)
This commit is contained in:
@@ -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>;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user