diff options
author | Colin Finck <colin@reactos.org> | 2021-07-28 19:51:25 +0300 |
---|---|---|
committer | Colin Finck <colin@reactos.org> | 2021-07-28 19:51:25 +0300 |
commit | b527378cd0209e212a9823557529fab1f036509f (patch) | |
tree | ba33fc8927f79417dbbc3158980bfb88be550412 | |
parent | 117411e8e360fcebcafda6d22b6bced80d7f1723 (diff) |
Make index type system depend on `core::fmt::Debug` to ease debugging
-rw-r--r-- | src/indexes/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/indexes/mod.rs b/src/indexes/mod.rs index 1e83146..ba3508c 100644 --- a/src/indexes/mod.rs +++ b/src/indexes/mod.rs @@ -6,12 +6,13 @@ mod file_name; pub use file_name::*; use crate::error::Result; +use core::fmt; -pub trait NtfsIndexEntryType { +pub trait NtfsIndexEntryType: fmt::Debug { type KeyType: NtfsIndexEntryKey; } -pub trait NtfsIndexEntryKey: Sized { +pub trait NtfsIndexEntryKey: fmt::Debug + Sized { fn key_from_slice(slice: &[u8], position: u64) -> Result<Self>; } @@ -21,7 +22,7 @@ pub trait NtfsIndexEntryHasData: NtfsIndexEntryType { type DataType: NtfsIndexEntryData; } -pub trait NtfsIndexEntryData: Sized { +pub trait NtfsIndexEntryData: fmt::Debug + Sized { fn data_from_slice(slice: &[u8], position: u64) -> Result<Self>; } |