Skip to content

Commit 5056f4c

Browse files
matthiaskrgrcalebcartwright
authored andcommitted
some minor clippy fixes
1 parent 34d374e commit 5056f4c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/cargo-fmt/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ fn get_targets_root_only(
387387
.unwrap_or_default()
388388
== current_dir_manifest
389389
})
390-
.map(|p| p.targets)
391-
.flatten()
390+
.flat_map(|p| p.targets)
392391
.collect(),
393392
};
394393

src/format_report_formatter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ impl<'a> FormatReportFormatterBuilder<'a> {
2020
}
2121

2222
/// Enables colors and formatting in the output.
23+
#[must_use]
2324
pub fn enable_colors(self, enable_colors: bool) -> Self {
2425
Self {
2526
enable_colors,

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub(crate) fn rewrite_macro(
152152
) -> Option<String> {
153153
let should_skip = context
154154
.skip_context
155-
.skip_macro(&context.snippet(mac.path.span).to_owned());
155+
.skip_macro(context.snippet(mac.path.span));
156156
if should_skip {
157157
None
158158
} else {

0 commit comments

Comments
 (0)