refactor: run takes &[&str]

This commit is contained in:
graelo 2021-03-22 08:55:03 +01:00
parent 4ec240c2b1
commit 92509fe534
3 changed files with 5 additions and 5 deletions

View file

@ -12,10 +12,11 @@ fn main() {
let mut buffer = String::new();
handle.read_to_string(&mut buffer).unwrap();
let lines = buffer.split('\n').collect::<Vec<_>>();
// Execute copyrat over the buffer (will take control over stdout).
// This returns the selected matche.
let selection: Option<Selection> = run(buffer, &opt);
let selection: Option<Selection> = run(&lines, &opt);
// Early exit, signaling no selections were found.
if selection.is_none() {