Skip to content

Commit

Permalink
Construct a PathBuf
Browse files Browse the repository at this point in the history
Representing what's the data here holistically.
  • Loading branch information
nagisa committed Jan 18, 2022
1 parent 964dd8b commit 6b33651
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ use libloading::{Library, Symbol};
const TARGET_DIR: Option<&'static str> = option_env!("CARGO_TARGET_DIR");
const TARGET_TMPDIR: Option<&'static str> = option_env!("CARGO_TARGET_TMPDIR");

fn lib_path() -> &'static str {
format!(
"{}/libtest_helpers.module",
TARGET_TMPDIR.unwrap_or(TARGET_DIR.unwrap_or("target"))
)
fn lib_path() -> std::path::PathBuf {
[
TARGET_TMPDIR.unwrap_or(TARGET_DIR.unwrap_or("target")),
"libtest_helpers.module",
]
.iter()
.collect()
}

fn make_helpers() {
Expand Down

0 comments on commit 6b33651

Please sign in to comment.