diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf/mod.rs | 1 | ||||
-rw-r--r-- | src/display/displayable_tree.rs | 1 | ||||
-rw-r--r-- | src/display/git_status_display.rs | 1 | ||||
-rw-r--r-- | src/display/mod.rs | 3 | ||||
-rw-r--r-- | src/display/permissions.rs | 1 | ||||
-rw-r--r-- | src/file_sum/mod.rs | 1 | ||||
-rw-r--r-- | src/file_sum/sum_computation.rs | 3 | ||||
-rw-r--r-- | src/filesystems/mod.rs | 1 | ||||
-rw-r--r-- | src/filesystems/mount_space_display.rs | 2 | ||||
-rw-r--r-- | src/git/ignore.rs | 1 | ||||
-rw-r--r-- | src/git/status_computer.rs | 1 | ||||
-rw-r--r-- | src/help/help_content.rs | 1 | ||||
-rw-r--r-- | src/kitty/image_renderer.rs | 1 | ||||
-rw-r--r-- | src/kitty/mod.rs | 1 | ||||
-rw-r--r-- | src/lib.rs | 6 | ||||
-rw-r--r-- | src/permissions/permissions_unix.rs | 1 | ||||
-rw-r--r-- | src/shell_install/bash.rs | 1 | ||||
-rw-r--r-- | src/shell_install/mod.rs | 2 | ||||
-rw-r--r-- | src/syntactic/syntactic_view.rs | 1 | ||||
-rw-r--r-- | src/task_sync.rs | 2 | ||||
-rw-r--r-- | src/verb/mod.rs | 2 |
21 files changed, 25 insertions, 9 deletions
diff --git a/src/conf/mod.rs b/src/conf/mod.rs index 394c9b0..09a6c67 100644 --- a/src/conf/mod.rs +++ b/src/conf/mod.rs @@ -10,6 +10,7 @@ mod verb_conf; pub use { conf::Conf, format::*, + lazy_static::lazy_static, verb_conf::VerbConf, }; diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs index 28ab478..fe050d0 100644 --- a/src/display/displayable_tree.rs +++ b/src/display/displayable_tree.rs @@ -1,5 +1,6 @@ use { super::{ + cond_bg, Col, CropWriter, GitStatusDisplay, diff --git a/src/display/git_status_display.rs b/src/display/git_status_display.rs index fd2e775..b443fc3 100644 --- a/src/display/git_status_display.rs +++ b/src/display/git_status_display.rs @@ -1,6 +1,7 @@ use { super::CropWriter, crate::{ + display::cond_bg, errors::ProgramError, git::TreeGitStatus, skin::StyleMap, diff --git a/src/display/mod.rs b/src/display/mod.rs index c59ebef..9b9d4ec 100644 --- a/src/display/mod.rs +++ b/src/display/mod.rs @@ -5,6 +5,7 @@ /// declare a style named `$dst` which is usually a reference to the `$src` /// skin but, in case `selected` is true, is a clone with background changed /// to the one of selected lines. +#[macro_export] macro_rules! cond_bg { ($dst:ident, $self:ident, $selected:expr, $src:expr) => { let mut cloned_style; @@ -38,6 +39,7 @@ mod permissions; pub use { areas::Areas, col::*, + cond_bg, crop_writer::CropWriter, displayable_tree::DisplayableTree, filling::*, @@ -57,6 +59,7 @@ use { }, QueueableCommand, }, + lazy_static::lazy_static, }; #[cfg(not(any(target_family="windows",target_os="android")))] diff --git a/src/display/permissions.rs b/src/display/permissions.rs index 9c7f0ae..56b8240 100644 --- a/src/display/permissions.rs +++ b/src/display/permissions.rs @@ -1,6 +1,7 @@ use { super::CropWriter, crate::{ + display::cond_bg, errors::ProgramError, permissions, skin::StyleMap, diff --git a/src/file_sum/mod.rs b/src/file_sum/mod.rs index 92abf3c..81832db 100644 --- a/src/file_sum/mod.rs +++ b/src/file_sum/mod.rs @@ -10,6 +10,7 @@ use { task_sync::Dam, }, ahash::AHashMap, + lazy_static::lazy_static, std::{ ops::AddAssign, path::{Path, PathBuf}, diff --git a/src/file_sum/sum_computation.rs b/src/file_sum/sum_computation.rs index 89f2a25..84e5072 100644 --- a/src/file_sum/sum_computation.rs +++ b/src/file_sum/sum_computation.rs @@ -5,8 +5,9 @@ use { path::*, task_sync::Dam, }, - crossbeam::channel, ahash::AHashMap, + crossbeam::channel, + lazy_static::lazy_static, rayon::{ThreadPool, ThreadPoolBuilder}, std::{ convert::TryInto, diff --git a/src/filesystems/mod.rs b/src/filesystems/mod.rs index fd6b148..d04b991 100644 --- a/src/filesystems/mod.rs +++ b/src/filesystems/mod.rs @@ -12,6 +12,7 @@ pub use { use { crossterm::style::Color, + lazy_static::lazy_static, std::sync::Mutex, }; diff --git a/src/filesystems/mount_space_display.rs b/src/filesystems/mount_space_display.rs index 1cd105d..cabc4cd 100644 --- a/src/filesystems/mount_space_display.rs +++ b/src/filesystems/mount_space_display.rs @@ -1,6 +1,6 @@ use { crate::{ - display::CropWriter, + display::{cond_bg, CropWriter}, errors::ProgramError, filesystems::share_color, skin::StyleMap, diff --git a/src/git/ignore.rs b/src/git/ignore.rs index 131b466..f3f267e 100644 --- a/src/git/ignore.rs +++ b/src/git/ignore.rs @@ -4,6 +4,7 @@ use { git2, glob, id_arena::{Arena, Id}, + lazy_static::lazy_static, lazy_regex::regex, std::{ fs::File, diff --git a/src/git/status_computer.rs b/src/git/status_computer.rs index 889af2b..8cb1528 100644 --- a/src/git/status_computer.rs +++ b/src/git/status_computer.rs @@ -7,6 +7,7 @@ use { crossbeam::channel::bounded, ahash::AHashMap, git2::Repository, + lazy_static::lazy_static, std::{ path::{Path, PathBuf}, sync::Mutex, diff --git a/src/help/help_content.rs b/src/help/help_content.rs index 889f974..33edf64 100644 --- a/src/help/help_content.rs +++ b/src/help/help_content.rs @@ -1,4 +1,5 @@ use { + lazy_static::lazy_static, minimad::{TextTemplate, TextTemplateExpander}, }; diff --git a/src/kitty/image_renderer.rs b/src/kitty/image_renderer.rs index 06f1a51..c949b2b 100644 --- a/src/kitty/image_renderer.rs +++ b/src/kitty/image_renderer.rs @@ -17,6 +17,7 @@ use { RgbImage, RgbaImage, }, + log::*, std::{ env, io::{self, Write}, diff --git a/src/kitty/mod.rs b/src/kitty/mod.rs index f3503f0..07cb901 100644 --- a/src/kitty/mod.rs +++ b/src/kitty/mod.rs @@ -3,6 +3,7 @@ mod image_renderer; pub use image_renderer::*; use { + lazy_static::lazy_static, std::sync::Mutex, }; @@ -1,17 +1,13 @@ -#[macro_use] extern crate crossbeam; -#[macro_use] extern crate minimad; -#[macro_use] extern crate lazy_static; #[macro_use] extern crate log; #[macro_use] extern crate cli_log; -#[macro_use] pub mod display; - pub mod app; pub mod browser; pub mod cli; pub mod command; pub mod conf; pub mod content_search; +pub mod display; pub mod errors; pub mod file_sum; pub mod flag; diff --git a/src/permissions/permissions_unix.rs b/src/permissions/permissions_unix.rs index 8860063..3fe1241 100644 --- a/src/permissions/permissions_unix.rs +++ b/src/permissions/permissions_unix.rs @@ -1,5 +1,6 @@ use { fnv::FnvHashMap, + lazy_static::lazy_static, std::sync::Mutex, }; diff --git a/src/shell_install/bash.rs b/src/shell_install/bash.rs index 00cd268..6e1c5e9 100644 --- a/src/shell_install/bash.rs +++ b/src/shell_install/bash.rs @@ -17,6 +17,7 @@ use { }, directories::UserDirs, lazy_regex::regex, + lazy_static::lazy_static, minimad::*, regex::Captures, std::{env, fs::OpenOptions, io::Write, path::PathBuf}, diff --git a/src/shell_install/mod.rs b/src/shell_install/mod.rs index 26d1d7c..a2c7186 100644 --- a/src/shell_install/mod.rs +++ b/src/shell_install/mod.rs @@ -5,6 +5,8 @@ use { path::{Path, PathBuf}, str::FromStr, }, + lazy_static::lazy_static, + minimad::mad_inline, termimad::{mad_print_inline, MadSkin}, }; diff --git a/src/syntactic/syntactic_view.rs b/src/syntactic/syntactic_view.rs index 3b8887b..3b675d1 100644 --- a/src/syntactic/syntactic_view.rs +++ b/src/syntactic/syntactic_view.rs @@ -14,6 +14,7 @@ use { style::{Color, Print, SetBackgroundColor, SetForegroundColor}, QueueableCommand, }, + lazy_static::lazy_static, memmap::Mmap, std::{ fs::File, diff --git a/src/task_sync.rs b/src/task_sync.rs index dcfa9b0..d1dc926 100644 --- a/src/task_sync.rs +++ b/src/task_sync.rs @@ -1,5 +1,5 @@ use { - crossbeam::channel::{self, bounded, Receiver}, + crossbeam::channel::{self, bounded, select, Receiver}, std::thread, termimad::Event, }; diff --git a/src/verb/mod.rs b/src/verb/mod.rs index 2c58db4..76d59e9 100644 --- a/src/verb/mod.rs +++ b/src/verb/mod.rs @@ -32,7 +32,7 @@ pub use { // the group you find in invocation patterns and execution patterns -lazy_static! { +lazy_static::lazy_static! { pub static ref GROUP: regex::Regex = regex::Regex::new(r"\{([^{}:]+)(?::([^{}:]+))?\}").unwrap(); } |