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]]
name = "copyrat"
path = "src/main.rs"
path = "src/bin/copyrat.rs"
[[bin]]
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::str::FromStr;
use copyrat::{error, output_destination::OutputDestination, selection::Selection, CliOpt};
mod tmux;
use copyrat::{error, output_destination::OutputDestination, selection::Selection, tmux, CliOpt};
/// Main configuration, parsed from command line.
#[derive(Clap, Debug)]

View file

@ -11,6 +11,7 @@ pub mod output_destination;
pub mod process;
pub mod regexes;
pub mod selection;
pub mod tmux;
pub mod ui;
/// 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::str::FromStr;
use copyrat::error::ParseError;
use copyrat::process;
use crate::error::ParseError;
use crate::process;
#[derive(Debug, PartialEq)]
pub struct Pane {
@ -241,7 +241,7 @@ pub fn swap_pane_with(target_pane: &str) -> Result<(), ParseError> {
mod tests {
use super::Pane;
use super::PaneId;
use copyrat::error;
use crate::error;
use std::str::FromStr;
#[test]