Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ flate2 = "1"
tar = "0.4.0"
percent-encoding = "2.1.0"
walkdir = "2.2"
toml = "0.5"
toml = "0.7"
fs2 = "0.4.3"
remove_dir_all = "0.7"
base64 = "0.13.0"
Expand All @@ -42,7 +42,7 @@ thiserror = "1.0.20"
git2 = "0.14.0"

[target.'cfg(unix)'.dependencies]
nix = "0.25.0"
nix = "0.26.0"

[target.'cfg(windows)'.dependencies]
windows-sys = {version = "0.36.1", features = ["Win32_Foundation", "Win32_System_Threading"]}
Expand Down
16 changes: 6 additions & 10 deletions src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ mod tests {
use super::TomlTweaker;
use crate::build::{CratePatch, GitCratePatch, PathCratePatch};
use crate::crates::Crate;
use toml::{self, Value};

#[test]
fn test_tweak_table_noop() {
Expand All @@ -390,11 +389,10 @@ mod tests {

let krate = Crate::local("/dev/null".as_ref());
let patches: Vec<CratePatch> = Vec::new();
let mut tweaker =
TomlTweaker::new_with_table(&krate, toml.as_table().unwrap().clone(), &patches);
let mut tweaker = TomlTweaker::new_with_table(&krate, toml, &patches);
tweaker.tweak();

assert_eq!(Value::Table(tweaker.table), result);
assert_eq!(tweaker.table, result);
}

#[test]
Expand Down Expand Up @@ -426,11 +424,10 @@ mod tests {

let krate = Crate::local("/dev/null".as_ref());
let patches: Vec<CratePatch> = Vec::new();
let mut tweaker =
TomlTweaker::new_with_table(&krate, toml.as_table().unwrap().clone(), &patches);
let mut tweaker = TomlTweaker::new_with_table(&krate, toml, &patches);
tweaker.tweak();

assert_eq!(Value::Table(tweaker.table), result);
assert_eq!(tweaker.table, result);
}

#[test]
Expand Down Expand Up @@ -485,10 +482,9 @@ mod tests {
path: "/path/to/baz".into(),
}),
];
let mut tweaker =
TomlTweaker::new_with_table(&krate, toml.as_table().unwrap().clone(), &patches);
let mut tweaker = TomlTweaker::new_with_table(&krate, toml, &patches);
tweaker.tweak();

assert_eq!(Value::Table(tweaker.table), result);
assert_eq!(tweaker.table, result);
}
}