From cd830ae064e1ad954aa07d2655ace62eb200746c Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 26 Apr 2022 12:19:07 +0300 Subject: fix for failing tests --- src/reader.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/reader.rs') diff --git a/src/reader.rs b/src/reader.rs index b7396cd..5b1b75f 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -2,11 +2,18 @@ //aim is to read this as a stream use std::fs::File; use std::io::BufReader; -use std::io::prelude::*; +use std::path::Path; + pub fn file_reader(file_path:&str) ->Result, Box>{ - let file = File::open(file_path)?; + + let y = Path::new(file_path); + + //println!("the file path is {}",y.display(); + println!("{}",y.display()); + + let file = File::open(Path::new(file_path))?; let buf_reader = BufReader::new(file); -- cgit 1.4.1