Skip to content

Commit 7219e8b

Browse files
authored
Turn off nix's default features (#123)
1 parent 671b323 commit 7219e8b

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

Cargo.lock

Lines changed: 0 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ clap = { version = "4", optional = true, features = ["derive", "wrap_help"] }
3838
count-zeroes = { version = "0.2.0", optional = true }
3939

4040
[features]
41+
default = [ "nix" ]
4142
cli = [ "lazy_static", "ansi_term", "pad", "unicode-width", "linefeed", "rand", "clap", "count-zeroes" ]
4243

4344
[target.'cfg(target_os = "linux")'.dependencies]
44-
nix = ">= 0.22, < 0.27"
45+
nix = { version = ">= 0.24, < 0.27", default-features = false, features = ["ioctl"], optional = true }

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ use std::ops::{Index, IndexMut, RangeInclusive};
8484
use thiserror::Error;
8585

8686
/// Linux specific helpers
87-
#[cfg(target_os = "linux")]
87+
#[cfg(all(target_os = "linux", feature = "nix"))]
8888
pub mod linux;
8989

9090
const DEFAULT_ALIGN: u64 = 2048;

0 commit comments

Comments
 (0)