Skip to content

Commit 369f5de

Browse files
committed
Silence warnings running embedded unittests.
1 parent 0de7f2e commit 369f5de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cargo/util/toml/embedded.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,12 @@ mod test_expand {
265265

266266
macro_rules! si {
267267
($i:expr) => {{
268-
expand_manifest(
269-
$i,
270-
std::path::Path::new("/home/me/test.rs"),
271-
&GlobalContext::default().unwrap(),
272-
)
273-
.unwrap_or_else(|err| panic!("{}", err))
268+
let shell = crate::Shell::from_write(Box::new(Vec::new()));
269+
let cwd = std::env::current_dir().unwrap();
270+
let home = home::cargo_home_with_cwd(&cwd).unwrap();
271+
let gctx = GlobalContext::new(shell, cwd, home);
272+
expand_manifest($i, std::path::Path::new("/home/me/test.rs"), &gctx)
273+
.unwrap_or_else(|err| panic!("{}", err))
274274
}};
275275
}
276276

0 commit comments

Comments
 (0)