Skip to content

Commit aade804

Browse files
committed
fix doctest
1 parent a22e9ef commit aade804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/unnecessary_map_on_constructor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ declare_clippy_lint! {
1616
///
1717
/// ### Example
1818
/// ```rust
19-
/// Some(4).map(foo)
19+
/// Some(4).map(i32::swap_bytes);
2020
/// ```
2121
/// Use instead:
2222
/// ```rust
23-
/// Some(foo(4))
23+
/// Some(i32::swap_bytes(4));
2424
/// ```
2525
#[clippy::version = "1.73.0"]
2626
pub UNNECESSARY_MAP_ON_CONSTRUCTOR,

0 commit comments

Comments
 (0)