refactor: refactor

This commit is contained in:
graelo 2021-03-17 22:13:13 +01:00
parent 0e0e581f86
commit d2d3e812fc
5 changed files with 7 additions and 8 deletions

View file

@ -17,8 +17,8 @@ duct = "0.13"
[[bin]] [[bin]]
name = "copyrat" name = "copyrat"
path = "src/main.rs" path = "src/bin/copyrat.rs"
[[bin]] [[bin]]
name = "tmux-copyrat" name = "tmux-copyrat"
path = "src/tmux_copyrat.rs" path = "src/bin/tmux_copyrat.rs"

View file

@ -2,9 +2,7 @@ use clap::Clap;
use std::collections::HashMap; use std::collections::HashMap;
use std::str::FromStr; use std::str::FromStr;
use copyrat::{error, output_destination::OutputDestination, selection::Selection, CliOpt}; use copyrat::{error, output_destination::OutputDestination, selection::Selection, tmux, CliOpt};
mod tmux;
/// Main configuration, parsed from command line. /// Main configuration, parsed from command line.
#[derive(Clap, Debug)] #[derive(Clap, Debug)]

View file

@ -11,6 +11,7 @@ pub mod output_destination;
pub mod process; pub mod process;
pub mod regexes; pub mod regexes;
pub mod selection; pub mod selection;
pub mod tmux;
pub mod ui; pub mod ui;
/// Run copyrat on an input string `buffer`, configured by `Opt`. /// Run copyrat on an input string `buffer`, configured by `Opt`.

View file

@ -4,8 +4,8 @@ use std::collections::HashMap;
use std::fmt; use std::fmt;
use std::str::FromStr; use std::str::FromStr;
use copyrat::error::ParseError; use crate::error::ParseError;
use copyrat::process; use crate::process;
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct Pane { pub struct Pane {
@ -241,7 +241,7 @@ pub fn swap_pane_with(target_pane: &str) -> Result<(), ParseError> {
mod tests { mod tests {
use super::Pane; use super::Pane;
use super::PaneId; use super::PaneId;
use copyrat::error; use crate::error;
use std::str::FromStr; use std::str::FromStr;
#[test] #[test]