From e7d23083b098208d8681f3f0e63aa2c628c15eae Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 22 Feb 2025 15:43:52 +0100 Subject: [PATCH] Resolve 2024 edition migration warnings --- Cargo.toml | 4 +++- showbits-common/src/widgets/text.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fc63d3d..9057a7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,9 @@ rust.unused_lifetimes = "warn" rust.unused_qualifications = "warn" # Clippy clippy.use_self = "warn" - +# Migrating to the 2024 edition +rust.rust_2024_compatibility = "warn" +rust.tail_expr_drop_order = { level = "allow", priority = 1 } # Optimize dependencies in debug mode (mainly for faster image exports). # Does not apply to workspace members, only "real" dependencies. diff --git a/showbits-common/src/widgets/text.rs b/showbits-common/src/widgets/text.rs index 66f5f33..55f59a5 100644 --- a/showbits-common/src/widgets/text.rs +++ b/showbits-common/src/widgets/text.rs @@ -118,7 +118,7 @@ impl Text { self } - pub fn widget(self, font_stuff: &mut FontStuff) -> impl Widget { + pub fn widget(self, font_stuff: &mut FontStuff) -> impl Widget + use { let fs = &mut font_stuff.font_system; let mut buffer = Buffer::new_empty(self.metrics); buffer.set_size(fs, f32::INFINITY, f32::INFINITY);