Skip to content

Commit 92bdcb5

Browse files
committed
update
1 parent 1279be7 commit 92bdcb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/process.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ pub fn process(name: &str) -> Result<(), Box<dyn std::error::Error>> {
8888
}).collect::<Vec<_>>().iter().for_each(|triple| {
8989
match triple {
9090
(triple, Some(neighbor)) => {
91-
writer.write_all(format!("{}\t{}\t{}\n", triple, neighbor.relation, neighbor.tail).as_bytes()).unwrap();
91+
writer.write(format!("{}\t{}\t{}\n", triple, neighbor.relation, neighbor.tail).as_bytes()).unwrap();
9292
},
9393
(triple, None) => {
94-
writer.write_all(format!("{}\n", triple).as_bytes()).unwrap();
94+
writer.write(format!("{}\n", triple).as_bytes()).unwrap();
9595
},
9696
}
9797
});
98+
writer.flush()?;
9899
println!("Found neighbor!");
99100
Ok(())
100101
}

0 commit comments

Comments
 (0)