Skip to content

Commit 8d9b60c

Browse files
committed
update duct_sh to edition 2021
1 parent 1b6084e commit 8d9b60c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

duct_sh/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description = "a sub-crate for the sh function, formerly in duct"
66
repository = "https://github.com/oconnor663/duct.rs/tree/master/duct_sh"
77
documentation = "https://docs.rs/duct_sh"
88
license = "MIT"
9+
edition = "2021"
910

1011
[dependencies]
1112
duct = { path = "../", version = "0.13" }

duct_sh/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,17 @@ fn shell_command_argv(command: OsString) -> Vec<OsString> {
136136

137137
#[cfg(test)]
138138
mod tests {
139+
use super::*;
140+
139141
#[test]
140142
fn test_sh() {
141-
let out = ::sh("echo hi").read().unwrap();
143+
let out = sh("echo hi").read().unwrap();
142144
assert_eq!("hi", out);
143145
}
144146

145147
#[test]
146148
fn test_sh_dangerous() {
147-
let out = ::sh_dangerous("echo hi".to_owned()).read().unwrap();
149+
let out = sh_dangerous("echo hi".to_owned()).read().unwrap();
148150
assert_eq!("hi", out);
149151
}
150152
}

0 commit comments

Comments
 (0)