Skip to content

Commit d167e03

Browse files
authored
Merge pull request #3 from rust-osdev/dependencies
build(deps): upgrade dependencies
2 parents 07bcc57 + db19647 commit d167e03

File tree

3 files changed

+43
-28
lines changed

3 files changed

+43
-28
lines changed

Cargo.lock

Lines changed: 30 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ all-features = true
1414
rustdoc-args = ["--cfg", "docsrs"]
1515

1616
[dependencies]
17-
allocator-api2 = { version = "0.2", default-features = false, features = ["alloc"], optional = true }
18-
bitfield-struct = "0.9"
17+
allocator-api2 = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
18+
bitfield-struct = "0.11"
1919
bitflags = "2"
2020
endian-num = { version = "0.2", features = ["bitflags", "linux-types"] }
2121
num_enum = { version = "0.7", default-features = false }
@@ -28,6 +28,6 @@ zerocopy-derive = { version = "0.8", optional = true }
2828
[features]
2929
alloc = ["dep:allocator-api2"]
3030
mmio = []
31-
nightly = ["allocator-api2/nightly"]
31+
nightly = []
3232
pci = ["dep:pci_types"]
3333
zerocopy = ["dep:zerocopy", "dep:zerocopy-derive", "endian-num/zerocopy"]

src/virtq/alloc.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
use ::alloc::alloc::handle_alloc_error;
2-
use allocator_api2::alloc::{AllocError, Allocator, Global};
3-
use allocator_api2::boxed::Box;
2+
#[cfg(feature = "nightly")]
3+
use ::alloc::{
4+
alloc::{AllocError, Allocator, Global},
5+
boxed::Box,
6+
};
7+
#[cfg(not(feature = "nightly"))]
8+
use allocator_api2::{
9+
alloc::{AllocError, Allocator, Global},
10+
boxed::Box,
11+
};
412

513
use super::*;
614

0 commit comments

Comments
 (0)