Bump target version to 2.0 (#957)

This commit is contained in:
Casey Rodarmor 2021-08-27 16:36:41 -07:00 committed by GitHub
parent f4a15c7192
commit dbf142369b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

4
Cargo.lock generated
View File

@ -532,9 +532,9 @@ dependencies = [
[[package]] [[package]]
name = "target" name = "target"
version = "1.1.0" version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1e4fbc9c74e1521bc75f7780d2546587e2ade1822f4c5107ce6e262162a2a8c" checksum = "ba852e71502340e2eaf2fa51f9b3ec6aa25750da1aa65771491c69d67789b05c"
[[package]] [[package]]
name = "tempfile" name = "tempfile"

View File

@ -30,7 +30,7 @@ libc = "0.2.0"
log = "0.4.4" log = "0.4.4"
snafu = "0.6.0" snafu = "0.6.0"
strum_macros = "0.21.1" strum_macros = "0.21.1"
target = "1.0.0" target = "2.0.0"
tempfile = "3.0.0" tempfile = "3.0.0"
typed-arena = "2.0.1" typed-arena = "2.0.1"
unicode-width = "0.1.0" unicode-width = "0.1.0"

View File

@ -179,7 +179,7 @@ fn os(_context: &FunctionContext) -> Result<String, String> {
} }
fn os_family(_context: &FunctionContext) -> Result<String, String> { fn os_family(_context: &FunctionContext) -> Result<String, String> {
Ok(target::os_family().to_owned()) Ok(target::family().to_owned())
} }
fn parent_directory(_context: &FunctionContext, path: &str) -> Result<String, String> { fn parent_directory(_context: &FunctionContext, path: &str) -> Result<String, String> {

View File

@ -6,8 +6,8 @@ test! {
foo: foo:
echo {{arch()}} {{os()}} {{os_family()}} echo {{arch()}} {{os()}} {{os_family()}}
"#, "#,
stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
} }
test! { test! {
@ -20,8 +20,8 @@ f := os_family()
foo: foo:
echo {{a}} {{o}} {{f}} echo {{a}} {{o}} {{f}}
"#, "#,
stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
} }
#[cfg(not(windows))] #[cfg(not(windows))]
@ -249,8 +249,8 @@ test! {
foo a=arch() o=os() f=os_family(): foo a=arch() o=os() f=os_family():
echo {{a}} {{o}} {{f}} echo {{a}} {{o}} {{f}}
"#, "#,
stdout: format!("{} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stdout: format!("{} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::os_family()).as_str(), stderr: format!("echo {} {} {}\n", target::arch(), target::os(), target::family()).as_str(),
} }
test! { test! {