Bump dependencies (#352)

This commit is contained in:
Roey Darwish Dror
2020-02-29 20:15:28 +02:00
committed by GitHub
parent 9c98005c61
commit f9374e3ddf
3 changed files with 215 additions and 158 deletions

361
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@ directories = "2.0.1"
serde = { version = "1.0.92", features = ["derive"] } serde = { version = "1.0.92", features = ["derive"] }
toml = "0.5.1" toml = "0.5.1"
which_crate = { version = "3.1.0", package = "which" } which_crate = { version = "3.1.0", package = "which" }
shellexpand = "1.0.0" shellexpand = "2.0.0"
structopt = "0.3.0" structopt = "0.3.0"
log = "0.4.6" log = "0.4.6"
walkdir = "2.2.7" walkdir = "2.2.7"
@@ -31,7 +31,6 @@ strum = { version = "0.17.1", features = ["derive"] }
thiserror = "1.0.9" thiserror = "1.0.9"
anyhow = "1.0.25" anyhow = "1.0.25"
tempfile = "3.1.0" tempfile = "3.1.0"
rust-ini = "0.14.0"
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]
notify-rust = "3.6.3" notify-rust = "3.6.3"
@@ -39,6 +38,9 @@ notify-rust = "3.6.3"
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
nix = "0.17.0" nix = "0.17.0"
[target.'cfg(target_os = "linux")'.dependencies]
rust-ini = "0.15.0"
[profile.release] [profile.release]
lto = true lto = true

View File

@@ -39,10 +39,8 @@ pub enum Distribution {
impl Distribution { impl Distribution {
fn parse_os_release(os_release: &ini::Ini) -> Result<Self> { fn parse_os_release(os_release: &ini::Ini) -> Result<Self> {
let section = os_release.general_section(); let section = os_release.general_section();
let id = section.get("ID").map(String::as_str); let id = section.get("ID");
let id_like: Option<Vec<&str>> = section let id_like: Option<Vec<&str>> = section.get("ID_LIKE").map(|s| s.split_whitespace().collect());
.get("ID_LIKE")
.map(|s| String::as_str(s).split_whitespace().collect());
if let Some(id_like) = id_like { if let Some(id_like) = id_like {
if id_like.contains(&"debian") || id_like.contains(&"ubuntu") { if id_like.contains(&"debian") || id_like.contains(&"ubuntu") {