Skip to content

Commit 0d928a2

Browse files
committed
feat(api): rename a struct
1 parent 22846c3 commit 0d928a2

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/hook/record_hardlink.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub use storage::RecordHardLinkStorage;
55
use super::{Hook, HookArgument};
66
use crate::{
77
inode::InodeNumber,
8-
reporter::{event::EncounterHardlink, Event, Reporter},
8+
reporter::{event::HardlinkDetection, Event, Reporter},
99
size,
1010
};
1111
use std::{fmt::Debug, os::unix::fs::MetadataExt};
@@ -46,7 +46,7 @@ where
4646
return;
4747
}
4848

49-
reporter.report(Event::EncounterHardlink(EncounterHardlink {
49+
reporter.report(Event::DetectHardlink(HardlinkDetection {
5050
path,
5151
stats,
5252
size,

src/reporter/event.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ use std::{fs::Metadata, path::Path};
88
pub enum Event<'a, Size: size::Size> {
99
ReceiveData(Size),
1010
EncounterError(ErrorReport<'a>),
11-
EncounterHardlink(EncounterHardlink<'a, Size>),
11+
DetectHardlink(HardlinkDetection<'a, Size>),
1212
}
1313

14-
/// Data of [`Event::EncounterHardlink`].
14+
/// Data of [`Event::DetectHardlink`].
1515
#[derive(Debug, Clone, Copy)]
16-
pub struct EncounterHardlink<'a, Size: size::Size> {
16+
pub struct HardlinkDetection<'a, Size: size::Size> {
1717
/// Path of the detected hardlink.
1818
pub path: &'a Path,
1919
/// Stats of the detected hardlink.

src/reporter/progress_and_error_reporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ where
9898
report_error(error_report);
9999
bump!(errors += 1);
100100
}
101-
EncounterHardlink(info) => {
101+
DetectHardlink(info) => {
102102
bump!(linked += info.links);
103103
bump!(shared += info.size.into());
104104
}

0 commit comments

Comments
 (0)