summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/error.rs b/src/error.rs
index 2159d46..737dce1 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -63,10 +63,9 @@ impl fmt::Display for Refused {
Refused::WrongState { entity, id, found, expected } => {
write!(f, "{entity} {id} is {found}, not {expected}")
}
- Refused::PointerMoved { pkgbase } => write!(
- f,
- "accepted pointer moved while this build was running; refusing to publish ({pkgbase})"
- ),
+ Refused::PointerMoved { pkgbase } => {
+ write!(f, "accepted pointer moved while this build was running; refusing to publish ({pkgbase})")
+ }
Refused::Other(s) => write!(f, "{s}"),
}
}
@@ -115,7 +114,9 @@ pub enum WorldGap {
impl fmt::Display for WorldGap {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
- WorldGap::MissingPin { package } => write!(f, "sandbox world is missing {package} after installing the lease set"),
+ WorldGap::MissingPin { package } => {
+ write!(f, "sandbox world is missing {package} after installing the lease set")
+ }
WorldGap::Other(s) => write!(f, "{s}"),
}
}
@@ -419,9 +420,10 @@ mod tests {
// The `From<&str>` arms exist so typing is incremental: a guard that is
// genuinely just a sentence lands in Invariant/Other rather than
// blocking the refactor.
- assert!(matches!(Error::fail_closed("no aur_commit on the source identity"),
- Error::FailClosed(Guard::Invariant(_))));
- assert!(matches!(Error::not_found("snapshot for build"),
- Error::NotFound(Missing::Other(_))));
+ assert!(matches!(
+ Error::fail_closed("no aur_commit on the source identity"),
+ Error::FailClosed(Guard::Invariant(_))
+ ));
+ assert!(matches!(Error::not_found("snapshot for build"), Error::NotFound(Missing::Other(_))));
}
}