Skip to content

Commit 372f713

Browse files
committed
Fix examples in lint docs
1 parent 3af383b commit 372f713

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/clones_into_boxed_slices.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ declare_clippy_lint! {
2020
///
2121
/// ### Example
2222
/// ```no_run
23-
/// "example".to_string().to_boxed_str()
23+
/// let boxed: Box<str> = "example".to_string().into_boxed_str();
2424
/// ```
2525
/// Use instead:
2626
/// ```no_run
27-
/// Box::from("example")
27+
/// let boxed: Box<str> = Box::from("example");
2828
/// ```
2929
#[clippy::version = "1.93.0"]
3030
pub CLONES_INTO_BOXED_SLICES,

0 commit comments

Comments
 (0)