1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30: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

@@ -1,4 +1,4 @@
use egui::{emath::GuiRounding as _, Id, Pos2, Rect, Response, Sense, Ui, UiBuilder};
use egui::{Id, Pos2, Rect, Response, Sense, Ui, UiBuilder, emath::GuiRounding as _};
#[derive(Clone, Copy)]
pub(crate) enum CellSize {

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:?}"
))
));
}
};

View File

@@ -1,7 +1,7 @@
use crate::{
Size,
layout::{CellDirection, CellSize, StripLayout, StripLayoutFlags},
sizing::Sizing,
Size,
};
use egui::{Response, Ui};

View File

@@ -5,8 +5,8 @@
#![allow(clippy::mem_forget)] // False positive from enum_map macro
use egui::text::LayoutJob;
use egui::TextStyle;
use egui::text::LayoutJob;
/// View some code with syntax highlighting and selection.
pub fn code_view_ui(

View File

@@ -4,13 +4,13 @@
//! Takes all available height, so if you want something below the table, put it in a strip.
use egui::{
scroll_area::{ScrollAreaOutput, ScrollBarVisibility, ScrollSource},
Align, Id, NumExt as _, Rangef, Rect, Response, ScrollArea, Ui, Vec2, Vec2b,
scroll_area::{ScrollAreaOutput, ScrollBarVisibility, ScrollSource},
};
use crate::{
layout::{CellDirection, CellSize, StripLayoutFlags},
StripLayout,
layout::{CellDirection, CellSize, StripLayoutFlags},
};
// -----------------------------------------------------------------=----------