birkenfeld / fddf

Fast data dupe finder
Apache License 2.0
114 stars 7 forks source link

Could not compile #14

Closed manfredlotz closed 6 years ago

manfredlotz commented 6 years ago

You are (presumably) at nightly. I could not compile. It is easy to fix but I thought I let you know.

Here the error messages

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:227:9
    |
227 |         Select::Any => true,
    |         ^^^^^^^^^^^ help: consider using a reference: `&Select::Any`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:228:9
    |
228 |         Select::Pattern(p) => entry.file_name().to_str().map_or(false, |f| p.matches(f)),
    |         ^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&Select::Pattern(p)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/main.rs:229:9
    |
229 |         Select::Regex(r) => entry.file_name().to_str().map_or(false, |f| r.is_match(f)),
    |         ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Select::Regex(r)`

error: aborting due to 3 previous errors

error: Could not compile `fddf`.

BTW

  1. Thanks for letting me do things in a dilettantish way. It was a good learning experience.
  2. I was impressed how structopt offered such an easy coding to deal with wrong patterns or regex. I have to study how clap does it then I can use it in my own code. At least where stack unwinding isn't required this is really very helpful.
birkenfeld commented 6 years ago

Hah, another newly stabilized feature crept in (match ergonomics). 1.26 really will be big.