common/emgauwa-core/src/utils.rs
Tobias Reisinger b2ff632e64
Improve config system
Add pkl to generate configs
2024-02-18 19:50:22 +01:00

7 lines
160 B
Rust

pub fn flatten_result<T, E>(res: Result<Result<T, E>, E>) -> Result<T, E> {
match res {
Ok(Ok(t)) => Ok(t),
Ok(Err(e)) => Err(e),
Err(e) => Err(e),
}
}