edit in common/beancount-tree-writer/src/lib.rs at line 7
edit in common/beancount-tree-writer/src/lib.rs at line 15
+ use miette::Diagnostic;
replacement in common/beancount-tree-writer/src/lib.rs at line 28
[3.771]→[3.771:795](∅→∅),
[3.795]→[3.39:69](∅→∅) − #[derive(Debug, Snafu)]
− pub struct Error(InnerError);
+ #[derive(Debug, Diagnostic, Snafu)]
+ #[snafu(display("encountered multiple errors while writing tree of accounts"))]
+ pub struct Error {
+ #[related]
+ errors: Vec<ErrorKind>,
+ }
replacement in common/beancount-tree-writer/src/lib.rs at line 73
[3.2049]→[3.639:696](∅→∅) − todo!("convert errors to summarized report")
replacement in common/beancount-tree-writer/src/lib.rs at line 84
[3.2368]→[3.771:805](∅→∅) − ) -> Result<(), InnerError> {
+ ) -> Result<(), ErrorKind> {
replacement in common/beancount-tree-writer/src/lib.rs at line 102
[3.2877]→[3.2877:2928](∅→∅) − File::create(file_path).map_err(<_>::into)
+ File::create(file_path)
edit in common/beancount-tree-writer/src/lib.rs at line 126
+ let separator = path::MAIN_SEPARATOR;
+
replacement in common/beancount-tree-writer/src/lib.rs at line 129
[3.3424]→[3.3424:3565](∅→∅) − let additional = AsRef::<str>::as_ref(&account).len() + 4 + 2 + 5 + 3; // account name + year + month + extension + extra separators
+ let additional = account.len() + 4 + 2 + 5 + 3; // account name + year + month + extension + extra separators
replacement in common/beancount-tree-writer/src/lib.rs at line 134
[3.3640]→[3.3640:3714](∅→∅) − .for_each(|component| write!(path, "/{component}").unwrap());
+ .for_each(|segment| write!(path, "{separator}{segment}").unwrap());
replacement in common/beancount-tree-writer/src/lib.rs at line 136
[3.3715]→[3.3715:3773](∅→∅) − write!(path, "/{year}/{month:02}.bean").unwrap();
+ write!(path, "{separator}{year}{separator}{month:02}.bean").unwrap();
replacement in common/beancount-tree-writer/src/lib.rs at line 143
[3.3849]→[3.1140:1169](∅→∅) − type Error = InnerError;
+ type Error = ErrorKind;
replacement in common/beancount-tree-writer/src/lib.rs at line 166
[3.1173]→[3.1173:1215](∅→∅) − #[derive(Debug, Snafu)]
− enum InnerError {
+ #[derive(Debug, Diagnostic, Snafu)]
+ enum ErrorKind {
edit in common/beancount-tree-writer/src/lib.rs at line 173
edit in common/beancount-tree-writer/Cargo.toml at line 21
+ miette.workspace = true
edit in Cargo.lock at line 198