flatbox_core 0.1.0

Provides core functionality for Flatbox engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::error::Error;

pub trait CatchError {
    fn catch(&self);
}

impl<E: Error> CatchError for Result<(), E> {
    fn catch(&self) {
        if let Err(e) = self {
            ::log::error!("{e}");
        }
    }
}