summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2023-09-03 17:41:30 +0200
committerGitHub <noreply@github.com>2023-09-03 17:41:30 +0200
commit7c7a6083d90af031ed14b585a9c60fa3b79422a0 (patch)
tree996d6a4c6a4f98a1f1d363a3eda923af6822eb3b
parentf8845cde24e04d0d105480300f260c5af5425def (diff)
parent183d465f74f4c818a6d8ccb6e580b17003d02ca3 (diff)
Merge pull request #5238 from cakebaker/uucore_ranges_feature0.0.21
uucore: turn ranges into a feature
-rw-r--r--src/uu/cut/Cargo.toml2
-rw-r--r--src/uu/numfmt/Cargo.toml2
-rw-r--r--src/uucore/Cargo.toml1
-rw-r--r--src/uucore/src/lib/features.rs2
-rw-r--r--src/uucore/src/lib/features/ranges.rs (renamed from src/uucore/src/lib/mods/ranges.rs)0
-rw-r--r--src/uucore/src/lib/lib.rs3
-rw-r--r--src/uucore/src/lib/mods.rs1
7 files changed, 7 insertions, 4 deletions
diff --git a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml
index be3ffe7f03..affeb38058 100644
--- a/src/uu/cut/Cargo.toml
+++ b/src/uu/cut/Cargo.toml
@@ -16,7 +16,7 @@ path = "src/cut.rs"
[dependencies]
clap = { workspace = true }
-uucore = { workspace = true }
+uucore = { workspace = true, features = ["ranges"] }
memchr = { workspace = true }
bstr = { workspace = true }
is-terminal = { workspace = true }
diff --git a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml
index c334a53e36..8fbf886a24 100644
--- a/src/uu/numfmt/Cargo.toml
+++ b/src/uu/numfmt/Cargo.toml
@@ -16,7 +16,7 @@ path = "src/numfmt.rs"
[dependencies]
clap = { workspace = true }
-uucore = { workspace = true }
+uucore = { workspace = true, features = ["ranges"] }
[[bin]]
name = "numfmt"
diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml
index 79b7c39d7d..fcbfdeac75 100644
--- a/src/uucore/Cargo.toml
+++ b/src/uucore/Cargo.toml
@@ -82,6 +82,7 @@ mode = ["libc"]
perms = ["libc", "walkdir"]
pipes = []
process = ["libc"]
+ranges = []
ringbuffer = []
signals = []
sum = [
diff --git a/src/uucore/src/lib/features.rs b/src/uucore/src/lib/features.rs
index c2dc975dce..786a646823 100644
--- a/src/uucore/src/lib/features.rs
+++ b/src/uucore/src/lib/features.rs
@@ -16,6 +16,8 @@ pub mod fsext;
pub mod lines;
#[cfg(feature = "memo")]
pub mod memo;
+#[cfg(feature = "ranges")]
+pub mod ranges;
#[cfg(feature = "ringbuffer")]
pub mod ringbuffer;
#[cfg(feature = "sum")]
diff --git a/src/uucore/src/lib/mods/ranges.rs b/src/uucore/src/lib/features/ranges.rs
index 29f4021836..29f4021836 100644
--- a/src/uucore/src/lib/mods/ranges.rs
+++ b/src/uucore/src/lib/features/ranges.rs
diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs
index 30ebae2542..5b9f4ae126 100644
--- a/src/uucore/src/lib/lib.rs
+++ b/src/uucore/src/lib/lib.rs
@@ -26,7 +26,6 @@ pub use crate::mods::line_ending;
pub use crate::mods::os;
pub use crate::mods::panic;
pub use crate::mods::quoting_style;
-pub use crate::mods::ranges;
pub use crate::mods::version_cmp;
// * string parsing modules
@@ -48,6 +47,8 @@ pub use crate::features::fsext;
pub use crate::features::lines;
#[cfg(feature = "memo")]
pub use crate::features::memo;
+#[cfg(feature = "ranges")]
+pub use crate::features::ranges;
#[cfg(feature = "ringbuffer")]
pub use crate::features::ringbuffer;
#[cfg(feature = "sum")]
diff --git a/src/uucore/src/lib/mods.rs b/src/uucore/src/lib/mods.rs
index 99055d014f..caa8fcb929 100644
--- a/src/uucore/src/lib/mods.rs
+++ b/src/uucore/src/lib/mods.rs
@@ -9,7 +9,6 @@ pub mod error;
pub mod line_ending;
pub mod os;
pub mod panic;
-pub mod ranges;
pub mod version_cmp;
// dir and vdir also need access to the quoting_style module
pub mod quoting_style;