From 4f83bcb58e5e5e260da4785069fa6e322fc06136 Mon Sep 17 00:00:00 2001 From: Ayose Date: Wed, 23 Jul 2025 00:00:00 +0000 Subject: Remove memoffset crate. Since Rust 1.77, `offset_of` is available in the std. --- Cargo.lock | 10 ---------- alacritty/Cargo.toml | 1 - alacritty/src/renderer/graphics/shader.rs | 4 ++-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b38fb1d..d0534cc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,7 +50,6 @@ dependencies = [ "home", "libc", "log", - "memoffset", "notify", "objc2 0.6.1", "objc2-app-kit 0.3.1", @@ -1057,15 +1056,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "miniz_oxide" version = "0.8.9" diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml index 59bbad8b..852d3a7a 100644 --- a/alacritty/Cargo.toml +++ b/alacritty/Cargo.toml @@ -32,7 +32,6 @@ glutin = { version = "0.32.2", default-features = false, features = ["egl", "wgl home = "0.5.5" libc = "0.2" log = { version = "0.4", features = ["std", "serde"] } -memoffset = "0.9.0" notify = "8.0.0" parking_lot = "0.12.0" serde_json = "1" diff --git a/alacritty/src/renderer/graphics/shader.rs b/alacritty/src/renderer/graphics/shader.rs index 650af0a5..d203f8be 100644 --- a/alacritty/src/renderer/graphics/shader.rs +++ b/alacritty/src/renderer/graphics/shader.rs @@ -149,7 +149,7 @@ fn define_vertex_attributes(shader_version: ShaderVersion) -> (GLuint, GLuint) { 1, gl::$type, mem::size_of::() as i32, - memoffset::offset_of!(Vertex, $field) as *const _, + mem::offset_of!(Vertex, $field) as *const _, ); attr_index += 1; @@ -164,7 +164,7 @@ fn define_vertex_attributes(shader_version: ShaderVersion) -> (GLuint, GLuint) { gl::$type, gl::FALSE, mem::size_of::() as i32, - memoffset::offset_of!(Vertex, $field) as *const _, + mem::offset_of!(Vertex, $field) as *const _, ); attr_index += 1; -- cgit