mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-14 08:53:52 +01:00
refactor: run takes &[&str]
This commit is contained in:
parent
4ec240c2b1
commit
92509fe534
3 changed files with 5 additions and 5 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue