diff --git a/Cargo.toml b/Cargo.toml index 8020aab..acfa05d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/bin/copyrat.rs similarity index 100% rename from src/main.rs rename to src/bin/copyrat.rs diff --git a/src/tmux_copyrat.rs b/src/bin/tmux_copyrat.rs similarity index 99% rename from src/tmux_copyrat.rs rename to src/bin/tmux_copyrat.rs index fb9e908..6aea8b0 100644 --- a/src/tmux_copyrat.rs +++ b/src/bin/tmux_copyrat.rs @@ -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)] diff --git a/src/lib.rs b/src/lib.rs index 57527ac..df58a83 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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`. diff --git a/src/tmux.rs b/src/tmux.rs index acff280..529e74d 100644 --- a/src/tmux.rs +++ b/src/tmux.rs @@ -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]