create a copy and without change self code.
(mut self)
| 62 | |
| 63 | /// create a copy and without change self code. |
| 64 | pub fn without_self_change(mut self) -> Self { |
| 65 | let out_file = self.src_file.with_extension("transform.cc"); |
| 66 | std::fs::copy(&self.src_file, &out_file) |
| 67 | .unwrap_or_else(|_| panic!("unable to copy {:?} to {:?}", self.src_file, out_file)); |
| 68 | self.src_file = out_file; |
| 69 | self |
| 70 | } |
| 71 | |
| 72 | pub fn get_output_file(&self) -> &Path { |
| 73 | &self.src_file |
no outgoing calls
no test coverage detected