mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Fix some clippy issues found by 1.84.0 (#5603)
This commit is contained in:
@@ -878,20 +878,6 @@ pub trait Storage {
|
||||
fn flush(&mut self);
|
||||
}
|
||||
|
||||
/// Stores nothing.
|
||||
#[derive(Clone, Default)]
|
||||
pub(crate) struct DummyStorage {}
|
||||
|
||||
impl Storage for DummyStorage {
|
||||
fn get_string(&self, _key: &str) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
fn set_string(&mut self, _key: &str, _value: String) {}
|
||||
|
||||
fn flush(&mut self) {}
|
||||
}
|
||||
|
||||
/// Get and deserialize the [RON](https://github.com/ron-rs/ron) stored at the given key.
|
||||
#[cfg(feature = "ron")]
|
||||
pub fn get_value<T: serde::de::DeserializeOwned>(storage: &dyn Storage, key: &str) -> Option<T> {
|
||||
|
||||
@@ -344,7 +344,7 @@ impl<'app> GlowWinitApp<'app> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'app> WinitApp for GlowWinitApp<'app> {
|
||||
impl WinitApp for GlowWinitApp<'_> {
|
||||
fn egui_ctx(&self) -> Option<&egui::Context> {
|
||||
self.running.as_ref().map(|r| &r.integration.egui_ctx)
|
||||
}
|
||||
@@ -479,7 +479,7 @@ impl<'app> WinitApp for GlowWinitApp<'app> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'app> GlowWinitRunning<'app> {
|
||||
impl GlowWinitRunning<'_> {
|
||||
fn run_ui_and_paint(
|
||||
&mut self,
|
||||
event_loop: &ActiveEventLoop,
|
||||
|
||||
@@ -323,7 +323,7 @@ impl<'app> WgpuWinitApp<'app> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'app> WinitApp for WgpuWinitApp<'app> {
|
||||
impl WinitApp for WgpuWinitApp<'_> {
|
||||
fn egui_ctx(&self) -> Option<&egui::Context> {
|
||||
self.running.as_ref().map(|r| &r.integration.egui_ctx)
|
||||
}
|
||||
@@ -487,7 +487,7 @@ impl<'app> WinitApp for WgpuWinitApp<'app> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'app> WgpuWinitRunning<'app> {
|
||||
impl WgpuWinitRunning<'_> {
|
||||
fn save_and_destroy(&mut self) {
|
||||
profiling::function_scope!();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user