Formatting
This commit is contained in:
1 parent
dddac01bdf
commit
10cf7f0d2e
29 files changed
+138
-138
No files matched your search
+8
-7
@@ -2,22 +2,23 @@
|
||||
macro_rules! push_error_task {
|
||||
($e:expr) => {
|
||||
iced::Task::done(push_error!($e))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! push_error {
|
||||
($e:expr) => {
|
||||
$crate::navigation::RootMessage::PushNotification($crate::notification::NotificationRequest::Error($e))
|
||||
}
|
||||
$crate::navigation::RootMessage::PushNotification(
|
||||
$crate::notification::NotificationRequest::Error($e),
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn into_result<R, E>(option: Option<R>, error: E) -> Result<R, E>{
|
||||
pub fn into_result<R, E>(option: Option<R>, error: E) -> Result<R, E> {
|
||||
if let Some(r) = option {
|
||||
Ok(r)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
Err(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user