jaaptools 0.1.14

I really just wanted to try publishing a package, but this contains stuff I find useful in many circumstances.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub trait JaapResult {
    fn for_error<F: FnOnce() -> ()>(self, f: F) -> Self;
}

impl<T, E> JaapResult for Result<T, E> {
    fn for_error<F: FnOnce() -> ()>(self, f: F) -> Self {
        if self.is_err() {
            f();
        }
        self
    }
}