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

pub(crate) static DATE_FMT: &str = "%e %b %y";

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}"),
        }
    }
}