diff --git a/volo-build/src/thrift_backend.rs b/volo-build/src/thrift_backend.rs index 100cf627..ef07cff8 100644 --- a/volo-build/src/thrift_backend.rs +++ b/volo-build/src/thrift_backend.rs @@ -376,16 +376,16 @@ impl VoloThriftBackend { } fn write_item(stream: &mut String, base_dir: &Path, name: String, impl_str: String) { - let req_recv_buf = base_dir.join(&name); - let req_recv_file = req_recv_buf.as_path(); - Self::write_file(req_recv_file, impl_str); + let path_buf = base_dir.join(&name); + let path = path_buf.as_path(); + Self::write_file(path, impl_str); stream.push_str(format!("include!(\"{}\");", &name).as_str()); } fn write_file(path: &Path, stream: String) { - let mut req_file_writer = std::io::BufWriter::new(std::fs::File::create(path).unwrap()); - req_file_writer.write_all(stream.as_bytes()).unwrap(); - req_file_writer.flush().unwrap(); + let mut file_writer = std::io::BufWriter::new(std::fs::File::create(path).unwrap()); + file_writer.write_all(stream.as_bytes()).unwrap(); + file_writer.flush().unwrap(); pilota_build::fmt::fmt_file(path); }