We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since type Validator<T> = fn(&T) -> bool;, i can't do something like:
type Validator<T> = fn(&T) -> bool;
let existing_filenames = read_dir(...); Readline::default() .title("Name new file:") .validator(|name| !existing_filenames.contains(name.to_string()), |name| format!("File {} already exists", name)) .prompt()? .run()?;
Suggest swapping this to something like type Validator<T> = Box<dyn Fn(&T) -> bool>;
type Validator<T> = Box<dyn Fn(&T) -> bool>;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since
type Validator<T> = fn(&T) -> bool;
, i can't do something like:Suggest swapping this to something like
type Validator<T> = Box<dyn Fn(&T) -> bool>;
The text was updated successfully, but these errors were encountered: