1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Use Rust edition 2024 (#7280)

This commit is contained in:
Emil Ernerfeldt
2025-06-30 14:01:57 +02:00
committed by GitHub
parent 962c8e26a8
commit b2995dcb83
190 changed files with 427 additions and 388 deletions

View File

@@ -19,13 +19,13 @@ impl File {
return Err(format!(
"failed to load {uri:?}: {} {} {response_text}",
response.status, response.status_text
))
));
}
None => {
return Err(format!(
"failed to load {uri:?}: {} {}",
response.status, response.status_text
))
));
}
}
}

View File

@@ -1,9 +1,8 @@
use ahash::HashMap;
use egui::{
decode_animated_image_uri, has_gif_magic_header,
ColorImage, FrameDurations, Id, decode_animated_image_uri, has_gif_magic_header,
load::{BytesPoll, ImageLoadResult, ImageLoader, ImagePoll, LoadError, SizeHint},
mutex::Mutex,
ColorImage, FrameDurations, Id,
};
use image::AnimationDecoder as _;
use std::{io::Cursor, mem::size_of, sync::Arc, time::Duration};

View File

@@ -1,9 +1,8 @@
use ahash::HashMap;
use egui::{
decode_animated_image_uri,
ColorImage, decode_animated_image_uri,
load::{Bytes, BytesPoll, ImageLoadResult, ImageLoader, ImagePoll, LoadError, SizeHint},
mutex::Mutex,
ColorImage,
};
use image::ImageFormat;
use std::{mem::size_of, path::Path, sync::Arc, task::Poll};

View File

@@ -1,17 +1,17 @@
use std::{
mem::size_of,
sync::{
atomic::{AtomicU64, Ordering::Relaxed},
Arc,
atomic::{AtomicU64, Ordering::Relaxed},
},
};
use ahash::HashMap;
use egui::{
ColorImage,
load::{BytesPoll, ImageLoadResult, ImageLoader, ImagePoll, LoadError, SizeHint},
mutex::Mutex,
ColorImage,
};
struct Entry {

View File

@@ -1,11 +1,10 @@
use ahash::HashMap;
use egui::{
decode_animated_image_uri, has_webp_header,
ColorImage, FrameDurations, Id, decode_animated_image_uri, has_webp_header,
load::{BytesPoll, ImageLoadResult, ImageLoader, ImagePoll, LoadError, SizeHint},
mutex::Mutex,
ColorImage, FrameDurations, Id,
};
use image::{codecs::webp::WebPDecoder, AnimationDecoder as _, ColorType, ImageDecoder as _, Rgba};
use image::{AnimationDecoder as _, ColorType, ImageDecoder as _, Rgba, codecs::webp::WebPDecoder};
use std::{io::Cursor, mem::size_of, sync::Arc, time::Duration};
#[derive(Clone)]
@@ -55,7 +54,7 @@ impl WebP {
unreachable => {
return Err(format!(
"Unreachable WebP color type, expected Rgb8/Rgba8, got {unreachable:?}"
))
));
}
};