Skip to content

Commit 09f65ce

Browse files
committed
Cleanup dead code
1 parent eea509b commit 09f65ce

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/lib.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fs::File, error::Error, io::{Read, BufReader, BufRead, Write}, fmt::Display};
1+
use std::{fs::File, io::{BufReader, BufRead, Write}, fmt::Display};
22
use neon::{prelude::*};
33
use simple_xlsx_writer::{WorkBook, Row as XLSRow, Cell};
44

@@ -11,25 +11,6 @@ impl<'a> Display for Row<'a> {
1111
}
1212
}
1313

14-
#[allow(dead_code)]
15-
fn read_file_buffer(filepath: String) -> Result<(), Box<dyn Error>> {
16-
const BUFFER_LEN: usize = 512;
17-
let mut buffer = [0u8; BUFFER_LEN];
18-
let mut file = File::open(filepath)?;
19-
20-
loop {
21-
let read_count = file.read(&mut buffer)?;
22-
let buff = &buffer[..read_count];
23-
let line = String::from_utf8_lossy(buff);
24-
println!("line: {}", line);
25-
26-
if read_count != BUFFER_LEN {
27-
break;
28-
}
29-
}
30-
Ok(())
31-
}
32-
3314
fn read_file_liner<F>(filepath: String, fn_operation: &mut F) -> Result<(), std::io::Error>
3415
where
3516
F: FnMut(&mut Row) -> Result<(), std::io::Error> {

0 commit comments

Comments
 (0)