Skip to content

Commit b41ff2e

Browse files
committed
uucore: turn backup_control into a feature
1 parent 4413dd1 commit b41ff2e

File tree

9 files changed

+21
-6
lines changed

9 files changed

+21
-6
lines changed

src/uu/cp/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ filetime = { workspace = true }
2424
libc = { workspace = true }
2525
quick-error = { workspace = true }
2626
selinux = { workspace = true, optional = true }
27-
uucore = { workspace = true, features = ["entries", "fs", "perms", "mode"] }
27+
uucore = { workspace = true, features = [
28+
"backup-control",
29+
"entries",
30+
"fs",
31+
"perms",
32+
"mode",
33+
] }
2834
walkdir = { workspace = true }
2935
indicatif = { workspace = true }
3036

src/uu/install/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ clap = { workspace = true }
1919
filetime = { workspace = true }
2020
file_diff = { workspace = true }
2121
libc = { workspace = true }
22-
uucore = { workspace = true, features = ["fs", "mode", "perms", "entries"] }
22+
uucore = { workspace = true, features = [
23+
"backup-control",
24+
"fs",
25+
"mode",
26+
"perms",
27+
"entries",
28+
] }
2329

2430
[[bin]]
2531
name = "install"

src/uu/ln/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ path = "src/ln.rs"
1616

1717
[dependencies]
1818
clap = { workspace = true }
19-
uucore = { workspace = true, features = ["fs"] }
19+
uucore = { workspace = true, features = ["backup-control", "fs"] }
2020

2121
[[bin]]
2222
name = "ln"

src/uu/mv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ path = "src/mv.rs"
1818
clap = { workspace = true }
1919
fs_extra = { workspace = true }
2020
indicatif = { workspace = true }
21-
uucore = { workspace = true, features = ["fs"] }
21+
uucore = { workspace = true, features = ["backup-control", "fs"] }
2222

2323
[[bin]]
2424
name = "mv"

src/uucore/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ windows-sys = { workspace = true, optional = true, default-features = false, fea
7171
[features]
7272
default = []
7373
# * non-default features
74+
backup-control = []
7475
encoding = ["data-encoding", "data-encoding-macro", "z85", "thiserror"]
7576
entries = ["libc"]
7677
fs = ["libc", "winapi-util", "windows-sys"]

src/uucore/src/lib/features.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// file that was distributed with this source code.
55
// features ~ feature-gated modules (core/bundler file)
66

7+
#[cfg(feature = "backup-control")]
8+
pub mod backup_control;
79
#[cfg(feature = "encoding")]
810
pub mod encoding;
911
#[cfg(feature = "fs")]
File renamed without changes.

src/uucore/src/lib/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ mod parser; // string parsing modules
2020
pub use uucore_procs::*;
2121

2222
// * cross-platform modules
23-
pub use crate::mods::backup_control;
2423
pub use crate::mods::display;
2524
pub use crate::mods::error;
2625
pub use crate::mods::line_ending;
@@ -38,6 +37,8 @@ pub use crate::parser::parse_time;
3837
pub use crate::parser::shortcut_value_parser;
3938

4039
// * feature-gated modules
40+
#[cfg(feature = "backup-control")]
41+
pub use crate::features::backup_control;
4142
#[cfg(feature = "encoding")]
4243
pub use crate::features::encoding;
4344
#[cfg(feature = "fs")]

src/uucore/src/lib/mods.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// file that was distributed with this source code.
55
// mods ~ cross-platforms modules (core/bundler file)
66

7-
pub mod backup_control;
87
pub mod display;
98
pub mod error;
109
pub mod line_ending;

0 commit comments

Comments
 (0)