fast_log 1.7.8

Rust async log High-performance asynchronous logging
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub trait FileName {
    fn extract_file_name(&self) -> String;
}
impl FileName for String {
    fn extract_file_name(&self) -> String {
        self.as_str().extract_file_name()
    }
}
impl FileName for &str {
    fn extract_file_name(&self) -> String {
        let path = self.replace("\\", "/");
        match path.rfind('/') {
            Some(index) => path[(index + 1)..].to_string(),
            None => path,
        }
    }
}