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
segment.seg.start = segment.seg.end;
segment.seg.width = 0;
segment.text = &"";
segment.text = "";
}
}
}

View File

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