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

@@ -55,10 +55,10 @@ impl TextureWrapModeExt for egui::TextureWrapMode {
#[derive(Debug)]
pub struct PainterError(String);
impl std::error::Error for PainterError {}
impl core::error::Error for PainterError {}
impl std::fmt::Display for PainterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
impl core::fmt::Display for PainterError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "OpenGL: {}", self.0)
}
}
@@ -219,7 +219,7 @@ impl Painter {
let a_tc_loc = gl.get_attrib_location(program, "a_tc").unwrap();
let a_srgba_loc = gl.get_attrib_location(program, "a_srgba").unwrap();
let stride = std::mem::size_of::<Vertex>() as i32;
let stride = core::mem::size_of::<Vertex>() as i32;
let buffer_infos = vec![
vao::BufferInfo {
location: a_pos_loc,