Rust_Search icon indicating copy to clipboard operation
Rust_Search copied to clipboard

Ability to use outside variables in custom_filter() for better filtering

Open ap-berry opened this issue 1 year ago • 0 comments

I want to use variables outside the scope of the closure inside custom_function(|d: DirEntry| { //code }) I am new to rust so please forgive me if I make a mistake.

Currently, this yeilds a type error because the closure is capturing outside variables. image image

Even using move or inner functions does not solve this problem. This functionality would be particularly useful when the value of outside_var can change or is not determined from the start.

ap-berry avatar Apr 13 '24 13:04 ap-berry