diff options
| author | Alexander <alexanderkabua@gmail.com> | 2022-04-26 13:50:19 +0300 |
|---|---|---|
| committer | Alexander <alexanderkabua@gmail.com> | 2022-04-26 13:50:19 +0300 |
| commit | 2bc733b9aa0c70cbd42721b6e898c831c66aa927 (patch) | |
| tree | 3204efae56125d6a4809720b0e627e633b1a33f8 /src/reader.rs | |
| parent | ee430fb3fcd3d8592e22e7a3d098630ebdb9cd37 (diff) | |
| download | correlation_rust-2bc733b9aa0c70cbd42721b6e898c831c66aa927.tar.gz | |
update tests
Diffstat (limited to 'src/reader.rs')
| -rw-r--r-- | src/reader.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reader.rs b/src/reader.rs index 593fda5..ce08ece 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -11,7 +11,7 @@ pub struct BufferReader { impl BufferReader{ - fn new(file_path:&str) -> std::io::Result<Self>{ + pub fn new(file_path:&str) -> std::io::Result<Self>{ let file = File::open(Path::new(file_path))?; //add file validator @@ -23,7 +23,7 @@ impl BufferReader{ } - fn read_line <'a>(&mut self,buf:&'a mut String) -> Option<std::io::Result<&'a mut String>>{ + pub fn read_line <'a>(&mut self,buf:&'a mut String) -> Option<std::io::Result<&'a mut String>>{ //to avoid allocation for each new line buf.clear(); |
