fix: use generic AsRef<Path> for shell setup parameter

This commit is contained in:
Tim Schubert 2025-08-10 00:37:22 +02:00
parent 9628bf9b71
commit 1a20120c25
No known key found for this signature in database

View file

@ -1,6 +1,6 @@
use std::path::Path;
pub fn setup_shell(code_root: &Path) {
pub fn setup_shell<T: AsRef<Path>>(code_root: T) {
println!(
r#"
h() {{
@ -10,6 +10,6 @@ h() {{
return $_h_ret
}}
"#,
code_root.display()
code_root.as_ref().display()
);
}