mirror of
https://github.com/nivekuil/rip
synced 2024-11-22 19:53:12 +00:00
Assign const to number of lines printed by inspect
This commit is contained in:
parent
f3aaa4acde
commit
77d3d1a707
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ use std::os::unix::fs::PermissionsExt;
|
|||
|
||||
static GRAVEYARD: &'static str = "/tmp/.graveyard";
|
||||
static RECORD: &'static str = ".record";
|
||||
const LINES_TO_INSPECT: usize = 6;
|
||||
|
||||
fn main() {
|
||||
let matches = App::new("rip")
|
||||
|
@ -142,7 +143,7 @@ Send files to the graveyard (/tmp/.graveyard) instead of unlinking them.")
|
|||
let f = fs::File::open(target).unwrap();
|
||||
for line in BufReader::new(f)
|
||||
.lines()
|
||||
.take(6)
|
||||
.take(LINES_TO_INSPECT)
|
||||
.filter(|line| line.is_ok()) {
|
||||
println!("> {}", line.unwrap());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue