Cleaned up imports.

This commit is contained in:
2026-09-26 20:57:38 +02:00
parent 859ae71c51
commit 75ee0cb760
16 changed files with 96 additions and 69 deletions
+18
View File
@@ -0,0 +1,18 @@
pub enum Upsert<T> {
Created(T),
Updated(T),
}
impl<T> Upsert<T> {
pub fn try_map<U, E>(self, f: impl FnOnce(T) -> Result<U, E>) -> Result<Upsert<U>, E> {
Ok(match self {
Self::Created(value) => Upsert::Created(f(value)?),
Self::Updated(value) => Upsert::Updated(f(value)?),
})
}
}
pub enum Delete {
Deleted,
NotFound,
}