Skip to content

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

@ap-berry

Description

@ap-berry

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions