mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
rust: remove dependency on itertools
The only use for itertools is in parse_mount_options() where we take a vector, convert it to iterator and then join it. Instead, we can join the vector directly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
aefc264401
commit
5ed0dcc001
10
rust-src/Cargo.lock
generated
10
rust-src/Cargo.lock
generated
@ -99,7 +99,6 @@ dependencies = [
|
||||
"errno 0.2.8",
|
||||
"gag",
|
||||
"getset",
|
||||
"itertools",
|
||||
"libc",
|
||||
"log",
|
||||
"parse-display",
|
||||
@ -407,15 +406,6 @@ dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
|
@ -21,7 +21,6 @@ udev = "0.7.0"
|
||||
uuid = "1.2.2"
|
||||
gag = "1.0.0"
|
||||
getset = "0.1"
|
||||
itertools = "0.9"
|
||||
parse-display = "0.1"
|
||||
errno = "0.2"
|
||||
either = "1.5"
|
||||
|
@ -76,12 +76,11 @@ fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, libc::c_ulo
|
||||
}
|
||||
});
|
||||
|
||||
use itertools::Itertools;
|
||||
(
|
||||
if opts.len() == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(opts.iter().join(","))
|
||||
Some(opts.join(","))
|
||||
},
|
||||
flags,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user