fix some typos
This commit is contained in:
parent
e73bb00542
commit
88541d6637
16 changed files with 21 additions and 21 deletions
|
|
@ -3786,7 +3786,7 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// ### Why is this bad?
|
||||
/// This pattern is often followed by manual unwrapping of the `Option`. The simplification
|
||||
/// results in more readable and succint code without the need for manual unwrapping.
|
||||
/// results in more readable and succinct code without the need for manual unwrapping.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
|
|
@ -3812,7 +3812,7 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// ### Why is this bad?
|
||||
/// This pattern is often followed by manual unwrapping of `Result`. The simplification
|
||||
/// results in more readable and succint code without the need for manual unwrapping.
|
||||
/// results in more readable and succinct code without the need for manual unwrapping.
|
||||
///
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ fn report_indexes(cx: &LateContext<'_>, map: &UnhashMap<u64, Vec<IndexEntry<'_>>
|
|||
slice,
|
||||
} if indexes.len() > 1 => {
|
||||
// if we have found an `assert!`, let's also check that it's actually right
|
||||
// and if it convers the highest index and if not, suggest the correct length
|
||||
// and if it covers the highest index and if not, suggest the correct length
|
||||
let sugg = match comparison {
|
||||
// `v.len() < 5` and `v.len() <= 5` does nothing in terms of bounds checks.
|
||||
// The user probably meant `v.len() > 5`
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ fn check_no_effect(cx: &LateContext<'_>, stmt: &Stmt<'_>) -> bool {
|
|||
}
|
||||
|
||||
fn is_operator_overridden(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
|
||||
// It's very hard or impossable to check whether overridden operator have side-effect this lint.
|
||||
// It's very hard or impossible to check whether overridden operator have side-effect this lint.
|
||||
// So, this function assume user-defined operator is overridden with an side-effect.
|
||||
// The definition of user-defined structure here is ADT-type,
|
||||
// Althrough this will weaken the ability of this lint, less error lint-fix happen.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use rustc_session::declare_lint_pass;
|
|||
|
||||
declare_clippy_lint! {
|
||||
/// ### What it does
|
||||
/// Checks for mis-uses of the serde API.
|
||||
/// Checks for misuses of the serde API.
|
||||
///
|
||||
/// ### Why is this bad?
|
||||
/// Serde is very finnicky about how its API should be
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ impl LateLintPass<'_> for WildcardImports {
|
|||
} else {
|
||||
// In this case, the `use_path.span` ends right before the `::*`, so we need to
|
||||
// extend it up to the `*`. Since it is hard to find the `*` in weird
|
||||
// formattings like `use _ :: *;`, we extend it up to, but not including the
|
||||
// formatting like `use _ :: *;`, we extend it up to, but not including the
|
||||
// `;`. In nested imports, like `use _::{inner::*, _}` there is no `;` and we
|
||||
// can just use the end of the item span
|
||||
let mut span = use_path.span.with_hi(item.span.hi());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue