mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Enable the clippy::std_instead_of_core lint (#8394)
Prefer `core::` over `std::` where either work * Part of https://github.com/emilk/egui/issues/5735
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||
#![expect(rustdoc::missing_crate_level_docs)] // it's an example
|
||||
|
||||
use std::sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
};
|
||||
use core::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
use eframe::egui;
|
||||
|
||||
@@ -88,7 +86,7 @@ impl eframe::App for MyApp {
|
||||
.clicked()
|
||||
{
|
||||
puffin::profile_scope!("long_sleep");
|
||||
std::thread::sleep(std::time::Duration::from_millis(50));
|
||||
std::thread::sleep(core::time::Duration::from_millis(50));
|
||||
}
|
||||
|
||||
ui.checkbox(
|
||||
@@ -172,7 +170,7 @@ fn start_puffin_server() {
|
||||
// We can store the server if we want, but in this case we just want
|
||||
// it to keep running. Dropping it closes the server, so let's not drop it!
|
||||
#[expect(clippy::mem_forget)]
|
||||
std::mem::forget(puffin_server);
|
||||
core::mem::forget(puffin_server);
|
||||
}
|
||||
Err(err) => {
|
||||
log::error!("Failed to start puffin server: {err}");
|
||||
|
||||
Reference in New Issue
Block a user