mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Fix lint documentation
This commit is contained in:
parent
2a9c254e23
commit
08708198fb
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
/// ```rust
|
||||
/// # let samples = vec![3, 1, 2];
|
||||
/// let mut sorted_samples = samples.clone();
|
||||
/// sorted_samples.sort();
|
||||
/// for sample in &samples { // Oops, meant to use `sorted_samples`.
|
||||
|
@ -38,6 +39,7 @@ declare_clippy_lint! {
|
|||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// # let samples = vec![3, 1, 2];
|
||||
/// let mut sorted_samples = samples.clone();
|
||||
/// sorted_samples.sort();
|
||||
/// for sample in &sorted_samples {
|
||||
|
|
Loading…
Reference in a new issue