mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
clippy::redudant_borrow
This commit is contained in:
parent
d6737e55fb
commit
c9b4ac5be4
114 changed files with 285 additions and 285 deletions
|
@ -30,7 +30,7 @@ impl ast::UseTree {
|
|||
let suffix = if self.path().as_ref() == Some(prefix) && self.use_tree_list().is_none() {
|
||||
make::path_unqualified(make::path_segment_self())
|
||||
} else {
|
||||
match split_path_prefix(&prefix) {
|
||||
match split_path_prefix(prefix) {
|
||||
Some(it) => it,
|
||||
None => return self.clone(),
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ impl ast::ByteString {
|
|||
(Ok(c), true) if char_range.len() == 1 && Some(c) == text_iter.next() => (),
|
||||
(Ok(c), true) => {
|
||||
buf.reserve_exact(text.len());
|
||||
buf.extend_from_slice(&text[..char_range.start].as_bytes());
|
||||
buf.extend_from_slice(text[..char_range.start].as_bytes());
|
||||
buf.push(c as u8);
|
||||
}
|
||||
(Err(_), _) => has_error = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue