chore: fix some minor issues in comments
Signed-off-by: houpo-bob <houpocun@outlook.com>
This commit is contained in:
parent
c7dd98c809
commit
64276e688c
4 changed files with 4 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// ### Why is this bad?
|
||||
///
|
||||
/// Infalliable conversions should be implemented via `From` with the blanket conversion.
|
||||
/// Infallible conversions should be implemented via `From` with the blanket conversion.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ fn main() {
|
|||
s4[2..].to_string();
|
||||
}
|
||||
|
||||
// Don't propose to reuse the `stripped` identifier as it is overriden
|
||||
// Don't propose to reuse the `stripped` identifier as it is overridden
|
||||
if s.starts_with("ab") {
|
||||
let stripped = &s["ab".len()..];
|
||||
//~^ ERROR: stripping a prefix manually
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ fn issue_12928() {
|
|||
let y = if let Some(Y(a, ..)) = x { a } else { 0 };
|
||||
}
|
||||
|
||||
// For symetry with `manual_unwrap_or` test
|
||||
// For symmetry with `manual_unwrap_or` test
|
||||
fn allowed_manual_unwrap_or_zero() -> u32 {
|
||||
Some(42).unwrap_or_default()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ fn issue_12928() {
|
|||
let y = if let Some(Y(a, ..)) = x { a } else { 0 };
|
||||
}
|
||||
|
||||
// For symetry with `manual_unwrap_or` test
|
||||
// For symmetry with `manual_unwrap_or` test
|
||||
fn allowed_manual_unwrap_or_zero() -> u32 {
|
||||
if let Some(x) = Some(42) {
|
||||
//~^ manual_unwrap_or_default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue