_hovi_@lemmy.worldtoProgrammer Humor@lemmy.ml•Throwing a whole tech stack at this problem...
6·
5 months agoI’d assume virtual machines - as for why, just checking their program works on different systems I guess
I’d assume virtual machines - as for why, just checking their program works on different systems I guess
Yeah as a junior this is accurate
Always forget the position: relative
As someone else said I think the shadowing works well here.
I do also wanna mention that depending on why you need this conversion, you could use
impl AsRef<std::path::Path>
for your function signature so it can accept&PathBuf
or&Path
. Then, just use that argument with e.g.p.as_ref()
to get a&Path
in the function body