Skip to content

Commit 7767b3a

Browse files
committed
Fixed formatting and typo
1 parent f9c6682 commit 7767b3a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use crate::utils::paths;
22
use crate::utils::sugg;
33
use crate::utils::{
4-
get_arg_name, get_parent_expr, get_trait_def_id, has_iter_method, implements_trait, in_macro, is_copy, is_expn_of, is_self,
5-
is_self_ty, iter_input_pats, last_path_segment, match_def_path, match_path, match_qpath, match_trait_method,
6-
match_type, match_var, method_calls, method_chain_args, remove_blocks, return_ty, same_tys, single_segment_path,
7-
snippet, snippet_with_applicability, snippet_with_macro_callsite, span_lint, span_lint_and_sugg,
8-
span_lint_and_then, span_note_and_lint, walk_ptrs_ty, walk_ptrs_ty_depth, SpanlessEq,
4+
get_arg_name, get_parent_expr, get_trait_def_id, has_iter_method, implements_trait, in_macro, is_copy, is_expn_of,
5+
is_self, is_self_ty, iter_input_pats, last_path_segment, match_def_path, match_path, match_qpath,
6+
match_trait_method, match_type, match_var, method_calls, method_chain_args, remove_blocks, return_ty, same_tys,
7+
single_segment_path, snippet, snippet_with_applicability, snippet_with_macro_callsite, span_lint,
8+
span_lint_and_sugg, span_lint_and_then, span_note_and_lint, walk_ptrs_ty, walk_ptrs_ty_depth, SpanlessEq,
99
};
1010
use if_chain::if_chain;
1111
use matches::matches;

clippy_lints/src/utils/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,10 +1156,7 @@ pub fn any_parent_is_automatically_derived(tcx: TyCtxt<'_, '_, '_>, node: NodeId
11561156
}
11571157

11581158
/// Returns true if ty has `iter` or `iter_mut` methods
1159-
pub fn has_iter_method(
1160-
cx: &LateContext<'_, '_>,
1161-
probably_ref_ty: ty::Ty<'_>,
1162-
) -> Option<&'static str> {
1159+
pub fn has_iter_method(cx: &LateContext<'_, '_>, probably_ref_ty: ty::Ty<'_>) -> Option<&'static str> {
11631160
// FIXME: instead of this hard-coded list, we should check if `<adt>::iter`
11641161
// exists and has the desired signature. Unfortunately FnCtxt is not exported
11651162
// so we can't use its `lookup_method` method.
@@ -1176,7 +1173,7 @@ pub fn has_iter_method(
11761173
&paths::HASHMAP,
11771174
&paths::PATH_BUF,
11781175
&paths::PATH,
1179-
&paths::RECIEVER,
1176+
&paths::RECEIVER,
11801177
];
11811178

11821179
let ty_to_check = match probably_ref_ty.sty {

clippy_lints/src/utils/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub const RANGE_TO_INCLUSIVE: [&str; 3] = ["core", "ops", "RangeToInclusive"];
8181
pub const RANGE_TO_INCLUSIVE_STD: [&str; 3] = ["std", "ops", "RangeToInclusive"];
8282
pub const RANGE_TO_STD: [&str; 3] = ["std", "ops", "RangeTo"];
8383
pub const RC: [&str; 3] = ["alloc", "rc", "Rc"];
84-
pub const RECIEVER: [&str; 4] = ["std", "sync", "mpsc", "Receiver"];
84+
pub const RECEIVER: [&str; 4] = ["std", "sync", "mpsc", "Receiver"];
8585
pub const REGEX: [&str; 3] = ["regex", "re_unicode", "Regex"];
8686
pub const REGEX_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "unicode", "RegexBuilder", "new"];
8787
pub const REGEX_BYTES_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "bytes", "RegexBuilder", "new"];

0 commit comments

Comments
 (0)