From f94753c511780039e3f726fc22cb78f80e715615 Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Fri, 12 Feb 2021 13:30:06 +0100 Subject: [PATCH] Chg: Don't Box FilterFn in WalkOptions Previously, `filter_fn` on the `WalkOptions` struct looked like: pub filter_fn: Option>, This boxing was unneccesary and has been changed to: pub filter_fn: Option<&'static FilterFn>, This will only affect people who use obsidian-export as a library in other Rust programs, not users of the CLI. For those library users, they no longer need to supply `FilterFn` wrapped in a Box. --- src/walker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/walker.rs b/src/walker.rs index 9b8b4f5..0d8d4b2 100644 --- a/src/walker.rs +++ b/src/walker.rs @@ -28,7 +28,7 @@ pub struct WalkOptions<'a> { /// it should be included or not. /// /// This is passed to [`ignore::WalkBuilder::filter_entry`]. - pub filter_fn: Option>, + pub filter_fn: Option<&'static FilterFn>, } impl<'a> fmt::Debug for WalkOptions<'a> {