Skip to content

Commit

Permalink
chore(deps): remove memoffset dependency (#7573)
Browse files Browse the repository at this point in the history
`offset_of!` macro [became stable in Rust 1.77.0](https://doc.rust-lang.org/nightly/core/mem/macro.offset_of.html) which is now within our MSRV. Remove the `memoffset` crate, and use `std::mem::offset_of` instead.
  • Loading branch information
overlookmotel committed Dec 1, 2024
1 parent 79014ff commit e62153b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 18 deletions.
10 changes: 0 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_traverse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ oxc_syntax = { workspace = true }

compact_str = { workspace = true }
itoa = { workspace = true }
memoffset = { workspace = true }
rustc-hash = { workspace = true }
4 changes: 1 addition & 3 deletions crates/oxc_traverse/scripts/lib/ancestor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
4 changes: 1 addition & 3 deletions crates/oxc_traverse/src/generated/ancestor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down

0 comments on commit e62153b

Please sign in to comment.