mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
ui-canvas: clippy 1.100 clean: no must_use on builders of a must_use type; the task bar's More story drive finds its button without expect
This commit is contained in:
@@ -243,7 +243,6 @@ impl<'a> TaskBar<'a> {
|
||||
/// Adds `rows` to the More menu after Hide, Pin and Reset and a divider: command rows take their label, chord, check
|
||||
/// and enabled state from the command, and submenus show as in panel menus. A dock row (`PanelRow::Item`) is not
|
||||
/// offered.
|
||||
#[must_use]
|
||||
pub fn more_rows(mut self, rows: Vec<PanelRow>) -> Self {
|
||||
debug_assert!(rows.iter().all(offered), "the task bar's More menu offers no dock rows");
|
||||
self.rows = rows;
|
||||
@@ -252,7 +251,6 @@ impl<'a> TaskBar<'a> {
|
||||
|
||||
/// Hangs the bar on `side` of the anchor's screen bounds, aligned by `align`, in place of the kind's side (below
|
||||
/// for the task bar, above for a selection bar) and centred.
|
||||
#[must_use]
|
||||
pub fn side(mut self, side: Side, align: Align) -> Self {
|
||||
self.side = Some(side);
|
||||
self.align = align;
|
||||
|
||||
@@ -113,8 +113,9 @@ fn configured(
|
||||
}
|
||||
|
||||
fn open_more(fixture: &mut Fixture) {
|
||||
let more = fixture.by_label("More options").expect("the bar has its More button");
|
||||
fixture.click(&more).settle();
|
||||
if let Some(more) = fixture.by_label("More options") {
|
||||
fixture.click(&more).settle();
|
||||
}
|
||||
}
|
||||
|
||||
/// The More menu open with the host's rows after its own: two command rows and a submenu.
|
||||
|
||||
@@ -240,8 +240,7 @@ fn a_double_press_on_a_ruler_places_a_guide_at_once() {
|
||||
fixture.fixture().hold(mods);
|
||||
fixture.double_press_at(at(rect));
|
||||
fixture.fixture().hold(Modifiers::NONE);
|
||||
let placed = guides.borrow().clone();
|
||||
placed
|
||||
guides.borrow().clone()
|
||||
};
|
||||
let top = |x: f32| move |rect: Rect| pos2(x, rect.min.y + 4.0);
|
||||
let left = |y: f32| move |rect: Rect| pos2(rect.min.x + 4.0, y);
|
||||
|
||||
Reference in New Issue
Block a user