diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-02 22:23:30 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-02 22:23:30 +0000 |
commit | 5d96ade59484927e7e590b64e2846ab409bbe63b (patch) | |
tree | bbd4ee52b766bcbbcdd13c9d6aea6407902e072f | |
parent | 151efb2198e74c994fec255b8f78c62900989544 (diff) | |
parent | c7b7d7e6664ab677c392155b9a6aec37409f4bb9 (diff) |
Merge #2164
2164: Silence some warnings r=matklad a=lnicola
```
warning: unnecessary parentheses around type
--> crates/ra_tt/src/buffer.rs:114:32
|
114 | pub fn end(self) -> Option<(&'a Subtree)> {
| ^^^^^^^^^^^^^ help: remove these parentheses
|
= note: `#[warn(unused_parens)]` on by default
warning: unnecessary parentheses around type
--> crates/ra_tt/src/buffer.rs:130:30
|
130 | fn entry(self) -> Option<(&'a Entry<'a>)> {
| ^^^^^^^^^^^^^^^ help: remove these parentheses
```
Co-authored-by: Laurențiu Nicola <[email protected]>
-rw-r--r-- | crates/ra_tt/src/buffer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_tt/src/buffer.rs b/crates/ra_tt/src/buffer.rs index ef3f2323c..14b3f707d 100644 --- a/crates/ra_tt/src/buffer.rs +++ b/crates/ra_tt/src/buffer.rs | |||
@@ -111,7 +111,7 @@ impl<'a> Cursor<'a> { | |||
111 | 111 | ||
112 | /// If the cursor is pointing at the end of a subtree, returns | 112 | /// If the cursor is pointing at the end of a subtree, returns |
113 | /// the parent subtree | 113 | /// the parent subtree |
114 | pub fn end(self) -> Option<(&'a Subtree)> { | 114 | pub fn end(self) -> Option<&'a Subtree> { |
115 | match self.entry() { | 115 | match self.entry() { |
116 | Some(Entry::End(Some(ptr))) => { | 116 | Some(Entry::End(Some(ptr))) => { |
117 | let idx = ptr.1; | 117 | let idx = ptr.1; |
@@ -127,7 +127,7 @@ impl<'a> Cursor<'a> { | |||
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | fn entry(self) -> Option<(&'a Entry<'a>)> { | 130 | fn entry(self) -> Option<&'a Entry<'a>> { |
131 | self.buffer.entry(&self.ptr) | 131 | self.buffer.entry(&self.ptr) |
132 | } | 132 | } |
133 | 133 | ||