chore: fix some minor issues in comments

Signed-off-by: houpo-bob <houpocun@outlook.com>
This commit is contained in:
houpo-bob 2025-07-30 15:49:56 +08:00
parent c7dd98c809
commit 64276e688c
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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()
}

View file

@ -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