summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 867a09c984233a639726ef6eaf0d1119cc67d7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
mod dirs;
pub mod error;
pub mod feed;
pub mod manager;
pub mod status;

pub trait PrintResult {
    fn print(&self);
}

impl<T, E> PrintResult for Result<T, E>
where
    T: std::fmt::Display,
    E: std::fmt::Display,
{
    fn print(&self) {
        match self {
            Ok(ok) => println!("{ok}"),
            Err(err) => eprintln!("{err}"),
        }
    }
}