mirror of
https://github.com/storytold/egui.git
synced 2026-11-24 03:22:06 +01:00
Bring back AsId, deprecated (#8586)
Removing `AsId` broke downstream crates that name the trait in their own bounds or re-exports. It is back, but `#[deprecated]` * https://github.com/emilk/egui/pull/8584 --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3690fb5b0e
commit
2007ec324b
2 files changed
+10
No files matched your search
@@ -4,6 +4,13 @@ use core::num::NonZeroU64;
|
||||
|
||||
use crate::{AsIdSalt, IdSalt};
|
||||
|
||||
/// Deprecated
|
||||
#[deprecated = "Use AsIdSalt or Id instead"]
|
||||
pub trait AsId: core::hash::Hash + core::fmt::Debug {}
|
||||
|
||||
#[expect(deprecated)]
|
||||
impl<T: core::hash::Hash + core::fmt::Debug> AsId for T {}
|
||||
|
||||
/// A (hopefully) unique identity within this application.
|
||||
///
|
||||
/// egui tracks widgets frame-to-frame using [`Id`]s.
|
||||
|
||||
@@ -505,6 +505,9 @@ pub use self::{
|
||||
widgets::*,
|
||||
};
|
||||
|
||||
#[expect(deprecated)]
|
||||
pub use self::id::AsId;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// Helper function that adds a label when compiling with debug assertions enabled.
|
||||
|
||||
Reference in new issue
Block a user