Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
fix clippy suggestions
  • Loading branch information
xarvic committed Jan 21, 2023
1 parent a0f7621 commit 440b459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion druid/examples/viewport_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use druid::{
AppLauncher, Color, Data, Insets, Lens, LocalizedString, RoundedRectRadii, Selector, WidgetExt,
WindowDesc,
};
use im::Vector;
use druid::im::Vector;
use std::sync::Arc;

#[derive(Clone, Data, Lens)]
Expand Down
2 changes: 1 addition & 1 deletion druid/src/widget/viewport_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl ViewportHeaderConfig {
let axis = self.header_side.axis();
let max = axis.major(self.content_size) - self.minimum_visible();

self.header_side.from_inset(insets).max(0.0).min(max)
self.header_side.from_inset(insets).clamp(0.0, max)
}

/// The amount of pixels the viewport of the content gets cropped by the header.
Expand Down

0 comments on commit 440b459

Please sign in to comment.