From a9586b37a8bdc7c6f77632db6940ce79b57299b4 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sun, 1 Dec 2024 19:11:11 +0000 Subject: [PATCH] chore(deps): remove `memoffset` dependency --- Cargo.lock | 10 ---------- Cargo.toml | 1 - crates/oxc_traverse/Cargo.toml | 1 - crates/oxc_traverse/scripts/lib/ancestor.mjs | 4 +--- crates/oxc_traverse/src/generated/ancestor.rs | 4 +--- 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af01e793cecd35..700d0119a275e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1159,15 +1159,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "mimalloc" version = "0.1.43" @@ -2087,7 +2078,6 @@ version = "0.38.0" dependencies = [ "compact_str", "itoa", - "memoffset", "oxc_allocator", "oxc_ast", "oxc_data_structures", diff --git a/Cargo.toml b/Cargo.toml index b21864bd8017d2..2d05e519de9ef8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,7 +158,6 @@ lazy_static = "1.5.0" log = "0.4.22" markdown = "1.0.0-alpha.21" memchr = "2.7.4" -memoffset = "0.9.1" miette = { package = "oxc-miette", version = "1.0.2", features = ["fancy-no-syscall"] } mimalloc = "0.1.43" mime_guess = "2.0.5" diff --git a/crates/oxc_traverse/Cargo.toml b/crates/oxc_traverse/Cargo.toml index a3c1617435b179..d191c9ab2833b5 100644 --- a/crates/oxc_traverse/Cargo.toml +++ b/crates/oxc_traverse/Cargo.toml @@ -33,5 +33,4 @@ oxc_syntax = { workspace = true } compact_str = { workspace = true } itoa = { workspace = true } -memoffset = { workspace = true } rustc-hash = { workspace = true } diff --git a/crates/oxc_traverse/scripts/lib/ancestor.mjs b/crates/oxc_traverse/scripts/lib/ancestor.mjs index 71c9cd2493ca09..d4ccaee38e29dd 100644 --- a/crates/oxc_traverse/scripts/lib/ancestor.mjs +++ b/crates/oxc_traverse/scripts/lib/ancestor.mjs @@ -121,9 +121,7 @@ export default function generateAncestorsCode(types) { clippy::needless_lifetimes )] - use std::{cell::Cell, marker::PhantomData}; - - use memoffset::offset_of; + use std::{cell::Cell, marker::PhantomData, mem::offset_of}; use oxc_allocator::{Address, Box, GetAddress, Vec}; use oxc_ast::ast::*; diff --git a/crates/oxc_traverse/src/generated/ancestor.rs b/crates/oxc_traverse/src/generated/ancestor.rs index b94d1b1a90b938..3811baa090b2b4 100644 --- a/crates/oxc_traverse/src/generated/ancestor.rs +++ b/crates/oxc_traverse/src/generated/ancestor.rs @@ -11,9 +11,7 @@ clippy::needless_lifetimes )] -use std::{cell::Cell, marker::PhantomData}; - -use memoffset::offset_of; +use std::{cell::Cell, marker::PhantomData, mem::offset_of}; use oxc_allocator::{Address, Box, GetAddress, Vec}; use oxc_ast::ast::*;