explicityly print the internal error from DispatchError

This commit is contained in:
appflowy
2021-08-31 11:32:51 +08:00
parent 18d13a3cb2
commit 4c93b04f3d
18 changed files with 84 additions and 69 deletions

View File

@ -23,4 +23,5 @@ similar = "1.2.2"
dialoguer = "0.8.0"
toml = "0.5.8"
serde = { version = "1.0", features = ["derive"] }
pathdiff = "0.2.0"
pathdiff = "0.2.0"
itertools = "0.10"

View File

@ -1,5 +1,6 @@
use crate::proto::proto_info::{CrateProtoInfo, ProtoFile};
use crate::util::{get_tera, read_file};
use itertools::Itertools;
use std::fs::OpenOptions;
use std::io::Write;
use tera::Context;
@ -13,6 +14,7 @@ pub struct ProtobufDeriveMeta {
#[allow(dead_code)]
impl ProtobufDeriveMeta {
pub fn new(structs: Vec<String>, enums: Vec<String>) -> Self {
let enums: Vec<_> = enums.into_iter().unique().collect();
return ProtobufDeriveMeta {
context: Context::new(),
structs,