some minor clippy fixes

This commit is contained in:
Matthias Krüger 2022-01-05 21:19:36 +01:00 committed by Caleb Cartwright
parent 34d374ee5d
commit 5056f4cfb3
3 changed files with 3 additions and 3 deletions

View File

@ -387,8 +387,7 @@ fn get_targets_root_only(
.unwrap_or_default()
== current_dir_manifest
})
.map(|p| p.targets)
.flatten()
.flat_map(|p| p.targets)
.collect(),
};

View File

@ -20,6 +20,7 @@ pub fn new(report: &'a FormatReport) -> Self {
}
/// Enables colors and formatting in the output.
#[must_use]
pub fn enable_colors(self, enable_colors: bool) -> Self {
Self {
enable_colors,

View File

@ -152,7 +152,7 @@ pub(crate) fn rewrite_macro(
) -> Option<String> {
let should_skip = context
.skip_context
.skip_macro(&context.snippet(mac.path.span).to_owned());
.skip_macro(context.snippet(mac.path.span));
if should_skip {
None
} else {