I’m playing with Path. I have a Path and want to add a ".spv" to the end. Like this:
"./foo/bar.vert" -> "./foo/bar.vert.spv"
So far, here is what I have:
let path = "./foo/bar.vert";
let spirv_path = path.to_path_buf().into_os_string().into_string().unwrap() + ".spv";
let mut spirv_path = Path::new(&spirv_path);
Looks convoluted for a such simple task. I'm sure there is a better way to do this.