Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
warning: redundant closure found
   --> src/bin/aocf.rs:207:14
    |
207 |         .map(|f| Aoc::load_json_from(f))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Aoc::load_json_from`
    |
    = note: `#[warn(clippy::redundant_closure)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
  • Loading branch information
nuxeh committed Dec 15, 2020
1 parent cca32ef commit 6b4fb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aocf_cli/src/bin/aocf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ fn summary(arg_year: Option<i32>, conf_year: i32) -> Result<(), Error> {
let mut configs: Vec<_> = fs::read_dir(find_root()?.join(".aocf/cache"))?
.map(|r| r.map(|e| e.path()))
.flatten()
.map(|f| Aoc::load_json_from(f))
.map(Aoc::load_json_from)
.flatten()
.filter(|a| a.year == Some(year))
.collect();
Expand Down

0 comments on commit 6b4fb3f

Please sign in to comment.