1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10: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,12 +1,12 @@
use std::collections::BTreeMap;
use std::sync::Arc;
use emath::{vec2, GuiRounding as _, Vec2};
use emath::{GuiRounding as _, Vec2, vec2};
use crate::{
TextureAtlas,
mutex::{Mutex, RwLock},
text::FontTweak,
TextureAtlas,
};
// ----------------------------------------------------------------------------

View File

@@ -1,12 +1,12 @@
use std::{collections::BTreeMap, sync::Arc};
use crate::{
TextureAtlas,
mutex::{Mutex, MutexGuard},
text::{
font::{Font, FontImpl},
Galley, LayoutJob, LayoutSection,
font::{Font, FontImpl},
},
TextureAtlas,
};
use emath::{NumExt as _, OrderedFloat};
@@ -680,7 +680,8 @@ impl FontsImpl {
/// Get the right font implementation from size and [`FontFamily`].
pub fn font(&mut self, font_id: &FontId) -> &mut Font {
let FontId { mut size, family } = font_id;
let FontId { size, family } = font_id;
let mut size = *size;
size = size.at_least(0.1).at_most(2048.0);
self.sized_family
@@ -1050,7 +1051,7 @@ mod tests {
use core::f32;
use super::*;
use crate::{text::TextFormat, Stroke};
use crate::{Stroke, text::TextFormat};
use ecolor::Color32;
use emath::Align;

View File

@@ -1,8 +1,8 @@
use std::sync::Arc;
use emath::{pos2, vec2, Align, GuiRounding as _, NumExt as _, Pos2, Rect, Vec2};
use emath::{Align, GuiRounding as _, NumExt as _, Pos2, Rect, Vec2, pos2, vec2};
use crate::{stroke::PathStroke, text::font::Font, Color32, Mesh, Stroke, Vertex};
use crate::{Color32, Mesh, Stroke, Vertex, stroke::PathStroke, text::font::Font};
use super::{FontsImpl, Galley, Glyph, LayoutJob, LayoutSection, PlacedRow, Row, RowVisuals};

View File

@@ -9,7 +9,7 @@ use super::{
font::UvRect,
};
use crate::{Color32, FontId, Mesh, Stroke};
use emath::{pos2, vec2, Align, GuiRounding as _, NumExt as _, OrderedFloat, Pos2, Rect, Vec2};
use emath::{Align, GuiRounding as _, NumExt as _, OrderedFloat, Pos2, Rect, Vec2, pos2, vec2};
/// Describes the task of laying out text.
///