mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-10 17:07:36 +00:00
chore: fix some typos
Signed-off-by: pavedroad <qcqs@outlook.com>
This commit is contained in:
parent
e22ca03627
commit
f472b50710
@ -2849,7 +2849,7 @@ declare_clippy_lint! {
|
|||||||
/// the file is created from scratch, or ensure `truncate` is
|
/// the file is created from scratch, or ensure `truncate` is
|
||||||
/// called so that the truncation behaviour is explicit. `truncate(true)`
|
/// called so that the truncation behaviour is explicit. `truncate(true)`
|
||||||
/// will ensure the file is entirely overwritten with new data, whereas
|
/// will ensure the file is entirely overwritten with new data, whereas
|
||||||
/// `truncate(false)` will explicitely keep the default behavior.
|
/// `truncate(false)` will explicitly keep the default behavior.
|
||||||
///
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```rust,no_run
|
/// ```rust,no_run
|
||||||
|
@ -213,7 +213,7 @@ fn is_super_only_import(segments: &[PathSegment<'_>]) -> bool {
|
|||||||
// Allow skipping imports containing user configured segments,
|
// Allow skipping imports containing user configured segments,
|
||||||
// i.e. "...::utils::...::*" if user put `allowed-wildcard-imports = ["utils"]` in `Clippy.toml`
|
// i.e. "...::utils::...::*" if user put `allowed-wildcard-imports = ["utils"]` in `Clippy.toml`
|
||||||
fn is_allowed_via_config(segments: &[PathSegment<'_>], allowed_segments: &FxHashSet<String>) -> bool {
|
fn is_allowed_via_config(segments: &[PathSegment<'_>], allowed_segments: &FxHashSet<String>) -> bool {
|
||||||
// segment matching need to be exact instead of using 'contains', in case user unintentionaly put
|
// segment matching need to be exact instead of using 'contains', in case user unintentionally put
|
||||||
// a single character in the config thus skipping most of the warnings.
|
// a single character in the config thus skipping most of the warnings.
|
||||||
segments.iter().any(|seg| allowed_segments.contains(seg.ident.as_str()))
|
segments.iter().any(|seg| allowed_segments.contains(seg.ident.as_str()))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user