parallel_disk_usage/hardlink/
ignorant.rs1use super::{DeduplicateSharedSize, RecordHardlinks, RecordHardlinksArgument};
2use crate::{data_tree::DataTree, os_string_display::OsStringDisplay, size};
3use std::convert::Infallible;
4
5#[derive(Debug, Default, Clone, Copy)]
9pub struct Ignorant;
10
11pub use Ignorant as HardlinkIgnorant;
12
13impl<Size, Reporter> RecordHardlinks<Size, Reporter> for Ignorant {
15 type Error = Infallible;
17
18 #[inline]
20 fn record_hardlinks(
21 &self,
22 _: RecordHardlinksArgument<Size, Reporter>,
23 ) -> Result<(), Self::Error> {
24 Ok(())
25 }
26}
27
28impl<Size> DeduplicateSharedSize<Size> for HardlinkIgnorant
30where
31 Size: size::Size + Sync,
32{
33 type Report = ();
35 type Error = Infallible;
37
38 #[inline]
40 fn deduplicate(
41 self,
42 _: &mut DataTree<OsStringDisplay, Size>,
43 ) -> Result<Self::Report, Self::Error> {
44 Ok(())
45 }
46}