bilgi 0.1.1

Cross-platform system information crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// MIT License
//
// Copyright (c) 2021 Ferhat Geçdoğan All Rights Reserved.
// Distributed under the terms of the MIT License.
//
//

pub mod helpers {
    use std::io::BufRead;

    pub fn read_lines<P: ?Sized>(file: &P) -> std::io::Result<
        std::io::Lines<std::io::BufReader<std::fs::File>>
    > where P: AsRef<std::path::Path>, {
        Ok(std::io::BufReader::new(
            std::fs::File::open(file)?).lines())
    }
}