From 9d12b43822174447b254898a5951a5d711e56df5 Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Fri, 17 Mar 2023 15:25:09 +0300 Subject: [PATCH] Initial commit --- .gitignore | 1 + src/file.rs | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4fffb2f..df49965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /Cargo.lock +.idea \ No newline at end of file diff --git a/src/file.rs b/src/file.rs index 3aa6c18..48db170 100644 --- a/src/file.rs +++ b/src/file.rs @@ -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 -} \ No newline at end of file +}