diff options
| author | Alexander <alexanderkabua@gmail.com> | 2022-04-26 12:19:07 +0300 |
|---|---|---|
| committer | Alexander <alexanderkabua@gmail.com> | 2022-04-26 12:19:07 +0300 |
| commit | cd830ae064e1ad954aa07d2655ace62eb200746c (patch) | |
| tree | 867ed665f1ae016c6b132b4b1b7511ab66c6ff1e /src/reader.rs | |
| parent | 361b23e687fa9416919c43fa993d58f94bd6c47a (diff) | |
| download | correlation_rust-cd830ae064e1ad954aa07d2655ace62eb200746c.tar.gz | |
fix for failing tests
Diffstat (limited to 'src/reader.rs')
| -rw-r--r-- | src/reader.rs | 11 |
1 files changed, 9 insertions, 2 deletions
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<BufReader<File>, Box<dyn std::error::Error>>{ - 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); |
