Merge commit '1fcc74cc9e03bc91eaa80ecf92976b0b14b3aeb6' into clippyup

This commit is contained in:
flip1995
2021-01-02 16:29:43 +01:00
parent 48dec842f2
commit ba4bf4f9c5
39 changed files with 646 additions and 248 deletions

View File

@@ -788,8 +788,7 @@ pub fn indent_of<T: LintContext>(cx: &T, span: Span) -> Option<usize> {
/// fn into3(self) -> () {}
/// ^
/// ```
#[allow(clippy::needless_pass_by_value)]
pub fn position_before_rarrow(s: String) -> Option<usize> {
pub fn position_before_rarrow(s: &str) -> Option<usize> {
s.rfind("->").map(|rpos| {
let mut rpos = rpos;
let chars: Vec<char> = s.chars().collect();