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 <lnicola@dend.ro>
This commit is contained in:
bors[bot] 2019-11-02 22:23:30 +00:00 committed by GitHub
commit 5d96ade594
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,7 @@ impl<'a> Cursor<'a> {
/// If the cursor is pointing at the end of a subtree, returns
/// the parent subtree
pub fn end(self) -> Option<(&'a Subtree)> {
pub fn end(self) -> Option<&'a Subtree> {
match self.entry() {
Some(Entry::End(Some(ptr))) => {
let idx = ptr.1;
@ -127,7 +127,7 @@ impl<'a> Cursor<'a> {
}
}
fn entry(self) -> Option<(&'a Entry<'a>)> {
fn entry(self) -> Option<&'a Entry<'a>> {
self.buffer.entry(&self.ptr)
}