Skip to content

Filter should work with dynamic values (&str instead of &'static str) #195

Closed
@bodymindarts

Description

The way Filter is currently defined

#[derive(Clone)]
pub struct Filter {
    pub p: Vec<&'static str>,
    pub g: Vec<&'static str>,
}

makes it impossible to filter dynamically since the values must be known at compile time. Could we change the definition to:

#[derive(Clone)]
pub struct Filter<'a> {
    pub p: Vec<&'a str>,
    pub g: Vec<&'a str>,
}

assuming the code compiles with the new definition would you accept a PR?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions