Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b941dc9a76 | |||
5da3c83c12
|
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.7.4] - 2025-07-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- cleanup aggregate error for single error
|
||||||
|
|
||||||
## [0.7.3] - 2025-07-24
|
## [0.7.3] - 2025-07-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -278,7 +278,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notmad"
|
name = "notmad"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.7.3"
|
version = "0.7.4"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
mad = { path = "crates/mad" }
|
mad = { path = "crates/mad" }
|
||||||
|
@@ -49,6 +49,14 @@ impl AggregateError {
|
|||||||
|
|
||||||
impl Display for AggregateError {
|
impl Display for AggregateError {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
if self.errors.is_empty() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.errors.len() == 1 {
|
||||||
|
return f.write_str(&self.errors.first().unwrap().to_string());
|
||||||
|
}
|
||||||
|
|
||||||
f.write_str("MadError::AggregateError: (")?;
|
f.write_str("MadError::AggregateError: (")?;
|
||||||
|
|
||||||
for error in &self.errors {
|
for error in &self.errors {
|
||||||
|
Reference in New Issue
Block a user