A method named `join` was not found for AsRef <Path>
I have a function that takes AsRef<Path>as an argument and looks like this:
fn test<P: AsRef<std::path::Path>>(path: P) {
path.join("13123123");
}
When I compile this, it gives me the following error
error[E0599]: no method named `join` found for type `P` in the current scope
--> src/main.rs:2:10
|
2 | path.join("13123123");
| ^^^^
+4
1 answer