mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix generate pb issues
This commit is contained in:
@ -53,12 +53,12 @@ fn write_rust_crate_mod_file(crate_infos: &[CrateProtoInfo]) {
|
||||
{
|
||||
Ok(ref mut file) => {
|
||||
let mut mod_file_content = String::new();
|
||||
mod_file_content.push_str("// Auto-generated, do not edit \n");
|
||||
mod_file_content.push_str("// Auto-generated, do not edit\n");
|
||||
walk_dir(
|
||||
crate_info.inner.proto_file_output_dir().as_ref(),
|
||||
|e| !e.file_type().is_dir(),
|
||||
|_, name| {
|
||||
let c = format!("\nmod {}; \npub use {}::*; \n", &name, &name);
|
||||
let c = format!("\nmod {};\npub use {}::*;\n", &name, &name);
|
||||
mod_file_content.push_str(c.as_ref());
|
||||
},
|
||||
);
|
||||
|
@ -17,10 +17,8 @@ impl CrateProtoInfo {
|
||||
// mod model;
|
||||
// pub use model::*;
|
||||
let mod_file_path = format!("{}/mod.rs", self.inner.protobuf_crate_name());
|
||||
let content = r#"
|
||||
mod model;
|
||||
pub use model::*;
|
||||
"#;
|
||||
let mut content = format!("// Auto-generated, do not edit\n");
|
||||
content.push_str("mod model;\npub use model::*;");
|
||||
match OpenOptions::new()
|
||||
.create(true)
|
||||
.write(true)
|
||||
|
Reference in New Issue
Block a user