Skip to content

Commit d85a8ec

Browse files
committed
feat: private HookArgument::new
1 parent 20cd6f1 commit d85a8ec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/hook.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ pub struct HookArgument<'a, Size> {
88
pub size: Size,
99
}
1010

11+
impl<'a, Size> HookArgument<'a, Size> {
12+
pub(crate) fn new(path: &'a Path, stats: &'a Metadata, size: Size) -> Self {
13+
HookArgument { path, stats, size }
14+
}
15+
}
16+
1117
/// Hook to run with a [`Path`] and its corresponding [`Metadata`] and size.
1218
pub trait Hook<Size> {
1319
fn run_hook(&self, argument: HookArgument<Size>);

0 commit comments

Comments
 (0)