Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore unnecessary_map_or clippy lint
warning: this `map_or` can be simplified --> src/loc.rs:547:36 | 547 | let serialize_separately = self | ____________________________________^ 548 | | .spelling_loc 549 | | .as_ref() 550 | | .zip(self.expansion_loc.as_ref()) 551 | | .map_or(true, |(spelling_loc, expansion_loc)| { 552 | | !same_bare_source_location(spelling_loc, expansion_loc) 553 | | }); | |______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]` help: use is_none_or instead | 547 ~ let serialize_separately = self 548 + .spelling_loc 549 + .as_ref() 550 + .zip(self.expansion_loc.as_ref()).is_none_or(|(spelling_loc, expansion_loc)| { 551 + !same_bare_source_location(spelling_loc, expansion_loc) 552 ~ }); |
- Loading branch information