mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-02 18:02:23 +00:00
[red-knot] Require that FileSystem
objects implement Debug
(#12204)
This commit is contained in:
parent
7910beecc4
commit
0f6f73ecf3
2 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue