summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/integration/src/main.rs3
-rw-r--r--examples/scrollable/src/main.rs6
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index d9aae7b9..c935aca7 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -102,9 +102,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
capabilities
.formats
.iter()
- .filter(|format| format.describe().srgb)
.copied()
- .next()
+ .find(wgpu::TextureFormat::is_srgb)
.or_else(|| capabilities.formats.first().copied())
.expect("Get preferred format"),
adapter
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index 2e99b1ac..97344c94 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -36,7 +36,7 @@ enum Message {
ScrollerWidthChanged(u16),
ScrollToBeginning,
ScrollToEnd,
- Scrolled(scrollable::RelativeOffset),
+ Scrolled(scrollable::Viewport),
}
impl Application for ScrollableDemo {
@@ -104,8 +104,8 @@ impl Application for ScrollableDemo {
self.current_scroll_offset,
)
}
- Message::Scrolled(offset) => {
- self.current_scroll_offset = offset;
+ Message::Scrolled(viewport) => {
+ self.current_scroll_offset = viewport.relative_offset();
Command::none()
}