1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -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:
Emil Ernerfeldt
2026-08-06 04:19:13 -07:00
committed by GitHub
parent 2a5f3d99b5
commit 6aea7eff94
176 changed files with 633 additions and 615 deletions

View File

@@ -301,7 +301,7 @@ impl ColorImage {
}
}
impl std::ops::Index<(usize, usize)> for ColorImage {
impl core::ops::Index<(usize, usize)> for ColorImage {
type Output = Color32;
#[inline]
@@ -312,7 +312,7 @@ impl std::ops::Index<(usize, usize)> for ColorImage {
}
}
impl std::ops::IndexMut<(usize, usize)> for ColorImage {
impl core::ops::IndexMut<(usize, usize)> for ColorImage {
#[inline]
fn index_mut(&mut self, (x, y): (usize, usize)) -> &mut Color32 {
let [w, h] = self.size;
@@ -335,8 +335,8 @@ impl From<Arc<ColorImage>> for ImageData {
}
}
impl std::fmt::Debug for ColorImage {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl core::fmt::Debug for ColorImage {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("ColorImage")
.field("size", &self.size)
.field("pixel-count", &self.pixels.len())