feat: almost done with rework communication with remotes now works

This commit is contained in:
DJMrTV 2025-03-24 23:31:25 +01:00
commit a7c36c39ef
14 changed files with 696 additions and 155 deletions

23
src/result.rs Normal file
View file

@ -0,0 +1,23 @@
use std::error::Error;
use log::error;
pub trait ResultExtension{
type Output;
fn display_err_or_some(self) -> Option<Self::Output>;
}
impl<T, U: Error> ResultExtension for Result<T, U>{
type Output = T;
fn display_err_or_some(self) -> Option<Self::Output> {
match self{
Ok(v) => Some(v),
Err(e) => {
error!("{}", e);
None
}
}
}
}