bch_bindgen: Remove memoffset dep

A trivial replacement allowed by std stabilizing it in rust 1.77.
Less crate dependencies means less odd decisions by packagers.
This commit is contained in:
Jubilee Young 2024-09-03 00:11:18 -07:00
parent 1e058db4b6
commit 1a5b11db3f
4 changed files with 3 additions and 19 deletions

16
Cargo.lock generated
View File

@ -65,12 +65,6 @@ version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]] [[package]]
name = "bcachefs-tools" name = "bcachefs-tools"
version = "1.12.0" version = "1.12.0"
@ -103,7 +97,6 @@ dependencies = [
"bitfield", "bitfield",
"bitflags 1.3.2", "bitflags 1.3.2",
"byteorder", "byteorder",
"memoffset",
"paste", "paste",
"pkg-config", "pkg-config",
"uuid", "uuid",
@ -379,15 +372,6 @@ version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
[[package]]
name = "memoffset"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "minimal-lexical" name = "minimal-lexical"
version = "0.2.1" version = "0.2.1"

View File

@ -3,7 +3,7 @@ name = "bcachefs-tools"
version = "1.12.0" version = "1.12.0"
authors = ["Yuxuan Shui <yshuiv7@gmail.com>", "Kayla Firestack <dev@kaylafire.me>", "Kent Overstreet <kent.overstreet@linux.dev>" ] authors = ["Yuxuan Shui <yshuiv7@gmail.com>", "Kayla Firestack <dev@kaylafire.me>", "Kent Overstreet <kent.overstreet@linux.dev>" ]
edition = "2021" edition = "2021"
rust-version = "1.70" rust-version = "1.77"
[[bin]] [[bin]]
name = "bcachefs" name = "bcachefs"

View File

@ -3,6 +3,7 @@ name = "bch_bindgen"
version = "0.1.0" version = "0.1.0"
authors = [ "Kayla Firestack <dev@kaylafire.me>", "Yuxuan Shui <yshuiv7@gmail.com>", "Kent Overstreet <kent.overstreet@linux.dev>" ] authors = [ "Kayla Firestack <dev@kaylafire.me>", "Yuxuan Shui <yshuiv7@gmail.com>", "Kent Overstreet <kent.overstreet@linux.dev>" ]
edition = "2021" edition = "2021"
rust-version = "1.77"
[lib] [lib]
crate-type = ["lib"] crate-type = ["lib"]
@ -12,7 +13,6 @@ crate-type = ["lib"]
anyhow = "1.0" anyhow = "1.0"
uuid = "1.2.2" uuid = "1.2.2"
bitfield = "0.14.0" bitfield = "0.14.0"
memoffset = "0.8.0"
byteorder = "1.3" byteorder = "1.3"
bitflags = "1.3.2" bitflags = "1.3.2"
paste = "1.0.11" paste = "1.0.11"

View File

@ -18,7 +18,7 @@ bitfield! {
pub struct bch_crypt_flags(u64); pub struct bch_crypt_flags(u64);
pub TYPE, _: 4, 0; pub TYPE, _: 4, 0;
} }
use memoffset::offset_of; use std::mem::offset_of;
impl bch_sb_field_crypt { impl bch_sb_field_crypt {
pub fn scrypt_flags(&self) -> Option<bch_scrypt_flags> { pub fn scrypt_flags(&self) -> Option<bch_scrypt_flags> {
use std::convert::TryInto; use std::convert::TryInto;