Merge branch 'feat/online2'

This commit is contained in:
appflowy
2021-12-20 15:38:41 +08:00
711 changed files with 11167 additions and 10469 deletions

View File

@ -46,7 +46,7 @@ fn parse_files_protobuf(proto_crate_path: &str, proto_output_dir: &str) -> Vec<P
// https://docs.rs/syn/1.0.54/syn/struct.File.html
let ast =
syn::parse_file(read_file(&path).unwrap().as_ref()).expect("Unable to parse file");
syn::parse_file(read_file(&path).unwrap().as_ref()).expect(&format!("Unable to parse file at {}", path));
let structs = get_ast_structs(&ast);
let proto_file_path = format!("{}/{}.proto", &proto_output_dir, &file_name);
let mut proto_file_content = parse_or_init_proto_file(proto_file_path.as_ref());

View File

@ -10,7 +10,7 @@ use tera::Tera;
use walkdir::WalkDir;
pub fn read_file(path: &str) -> Option<String> {
let mut file = File::open(path).expect("Unable to open file");
let mut file = File::open(path).unwrap_or_else(|_| panic!("Unable to open file at {}", path));
let mut content = String::new();
match file.read_to_string(&mut content) {
Ok(_) => Some(content),

View File

@ -13,7 +13,7 @@ cargo test
dependencies = ["rm_cache"]
script = """
cd rust-lib
cargo test --features "flowy-workspace/http_server","flowy-user/http_server"
cargo test --features "flowy-core/http_server","flowy-user/http_server"
"""