From b527378cd0209e212a9823557529fab1f036509f Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Wed, 28 Jul 2021 18:51:25 +0200 Subject: Make index type system depend on `core::fmt::Debug` to ease debugging --- src/indexes/mod.rs | 7 ++++--- 1 file 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; } @@ -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; } -- cgit v1.2.3