mirror of
https://github.com/ivabus/smurf
synced 2024-11-24 09:25:10 +03:00
Initial commit
This commit is contained in:
parent
88264697ca
commit
9d12b43822
2 changed files with 3 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
/Cargo.lock
|
||||
.idea
|
|
@ -1,4 +1,3 @@
|
|||
use log::error;
|
||||
use std::fs::File;
|
||||
use std::io::{prelude::*, BufReader};
|
||||
|
||||
|
@ -7,7 +6,7 @@ pub fn read_to_str(path: &std::path::PathBuf) -> String {
|
|||
let file = match file {
|
||||
Ok(data) => data,
|
||||
Err(err) => {
|
||||
error!("Cannot open file \"{}\"", path.display());
|
||||
eprintln!("Cannot open file \"{}\"", path.display());
|
||||
std::process::exit(2)
|
||||
}
|
||||
};
|
||||
|
@ -15,4 +14,4 @@ pub fn read_to_str(path: &std::path::PathBuf) -> String {
|
|||
let mut content = String::new();
|
||||
buf_reader.read_to_string(&mut content).unwrap();
|
||||
content
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue