aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/algo/mod.rs
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2018-10-16 16:54:29 +0100
committerAlan Du <[email protected]>2018-10-18 00:42:23 +0100
commit4e8ea94e2b72a3e927c8ff1b5f3fe2413ccc79a7 (patch)
tree1c84a3c96eb4846d0e315d295d69e95892ccee0e /crates/ra_syntax/src/algo/mod.rs
parentd493a4476c2059924d032fbf01dda091601f9667 (diff)
Remove Copy trait on LeafAtOffset
Because it's a stateful iterator, it's easier to explicitly clone it when necesary. Fixes clippy:clone_on_copy
Diffstat (limited to 'crates/ra_syntax/src/algo/mod.rs')
-rw-r--r--crates/ra_syntax/src/algo/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/algo/mod.rs b/crates/ra_syntax/src/algo/mod.rs
index 87f1250bc..d82c42b3e 100644
--- a/crates/ra_syntax/src/algo/mod.rs
+++ b/crates/ra_syntax/src/algo/mod.rs
@@ -46,7 +46,7 @@ pub fn find_leaf_at_offset(node: SyntaxNodeRef, offset: TextUnit) -> LeafAtOffse
46 } 46 }
47} 47}
48 48
49#[derive(Clone, Copy, Debug)] 49#[derive(Clone, Debug)]
50pub enum LeafAtOffset<'a> { 50pub enum LeafAtOffset<'a> {
51 None, 51 None,
52 Single(SyntaxNodeRef<'a>), 52 Single(SyntaxNodeRef<'a>),