Fix some clippy warnings

This commit is contained in:
Alexandre Bury 2018-01-09 15:20:07 +01:00
parent f8588e74c1
commit 4383526ec0
2 changed files with 5 additions and 7 deletions

View File

@ -31,7 +31,7 @@ impl<'a> Chunk<'a> {
// Empty this segment // Empty this segment
segment.seg.start = segment.seg.end; segment.seg.start = segment.seg.end;
segment.seg.width = 0; segment.seg.width = 0;
segment.text = &""; segment.text = "";
} }
} }
} }

View File

@ -341,15 +341,13 @@ impl View for Menubar {
.checked_sub(offset) .checked_sub(offset)
.and_then(|pos| self.child_at(pos.x)) .and_then(|pos| self.child_at(pos.x))
{ {
if self.root.children[child].is_leaf() { if self.focus == child && btn == MouseButton::Left
if self.focus == child { && self.root.children[child].is_leaf()
if btn == MouseButton::Left { {
return self.select_child(false); return self.select_child(false);
} }
} }
} }
}
}
Event::Mouse { Event::Mouse {
event: MouseEvent::Press(_), event: MouseEvent::Press(_),
.. ..