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() .unwrap_or_default()
== current_dir_manifest == current_dir_manifest
}) })
.map(|p| p.targets) .flat_map(|p| p.targets)
.flatten()
.collect(), .collect(),
}; };

View File

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

View File

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