mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 14:12:31 +00:00
Fix the module import paths
This commit is contained in:
parent
1cd275de76
commit
e4882c5c99
14 changed files with 53 additions and 57 deletions
12
src/core.rs
12
src/core.rs
|
@ -1,9 +1,9 @@
|
|||
use color::{self, Colors};
|
||||
use display;
|
||||
use flags::{Flags, IconTheme, WhenFlag};
|
||||
use icon::{self, Icons};
|
||||
use meta::Meta;
|
||||
use sort;
|
||||
use crate::color::{self, Colors};
|
||||
use crate::display;
|
||||
use crate::flags::{Flags, IconTheme, WhenFlag};
|
||||
use crate::icon::{self, Icons};
|
||||
use crate::meta::Meta;
|
||||
use crate::sort;
|
||||
use std::path::PathBuf;
|
||||
use terminal_size::terminal_size;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use crate::color::Colors;
|
||||
use crate::flags::Flags;
|
||||
use crate::icon::Icons;
|
||||
use crate::meta::{FileType, Meta};
|
||||
use ansi_term::{ANSIString, ANSIStrings};
|
||||
use color::Colors;
|
||||
use flags::Flags;
|
||||
use icon::Icons;
|
||||
use meta::{FileType, Meta};
|
||||
use term_grid::{Cell, Direction, Filling, Grid, GridOptions};
|
||||
use terminal_size::terminal_size;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
@ -352,11 +352,11 @@ fn detect_size_lengths(metas: &[Meta]) -> (usize, usize) {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use color;
|
||||
use color::Colors;
|
||||
use icon;
|
||||
use icon::Icons;
|
||||
use meta::{FileType, Name};
|
||||
use crate::color;
|
||||
use crate::color::Colors;
|
||||
use crate::icon;
|
||||
use crate::icon::Icons;
|
||||
use crate::meta::{FileType, Name};
|
||||
use std::path::Path;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use meta::{FileType, Name};
|
||||
use crate::meta::{FileType, Name};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct Icons {
|
||||
|
@ -308,7 +308,7 @@ impl Icons {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::{Icons, Theme, ICON_SPACE};
|
||||
use meta::{FileType, Name, Permissions};
|
||||
use crate::meta::{FileType, Name, Permissions};
|
||||
use std::fs::File;
|
||||
use tempdir::TempDir;
|
||||
|
||||
|
|
17
src/main.rs
17
src/main.rs
|
@ -1,11 +1,8 @@
|
|||
#![cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::match_same_arms,
|
||||
clippy::cast_possible_wrap
|
||||
)
|
||||
#![allow(
|
||||
clippy::cast_precision_loss,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::match_same_arms,
|
||||
clippy::cast_possible_wrap
|
||||
)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -30,8 +27,8 @@ mod icon;
|
|||
mod meta;
|
||||
mod sort;
|
||||
|
||||
use core::Core;
|
||||
use flags::Flags;
|
||||
use crate::core::Core;
|
||||
use crate::flags::Flags;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use crate::flags::{DateFlag, Flags};
|
||||
use chrono_humanize::{Accuracy, HumanTime, Tense};
|
||||
use color::{ColoredString, Colors, Elem};
|
||||
use flags::{DateFlag, Flags};
|
||||
use std::fs::Metadata;
|
||||
use std::time::UNIX_EPOCH;
|
||||
use time::{Duration, Timespec};
|
||||
|
@ -61,12 +61,11 @@ impl Date {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::Date;
|
||||
use crate::color::{Colors, Theme};
|
||||
use crate::flags::{DateFlag, Flags};
|
||||
use ansi_term::Colour;
|
||||
use color::{Colors, Theme};
|
||||
use flags::{DateFlag, Flags};
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::process::Command;
|
||||
use std::{env, fs};
|
||||
use time;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use color::{ColoredString, Colors, Elem};
|
||||
use meta::Permissions;
|
||||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use crate::meta::Permissions;
|
||||
use std::fs::Metadata;
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
|
||||
|
@ -66,9 +66,9 @@ impl FileType {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::FileType;
|
||||
use crate::color::{Colors, Theme};
|
||||
use crate::meta::Permissions;
|
||||
use ansi_term::Colour;
|
||||
use color::{Colors, Theme};
|
||||
use meta::Permissions;
|
||||
use std::fs::File;
|
||||
use std::os::unix::fs::symlink;
|
||||
use std::os::unix::net::UnixListener;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::color::ColoredString;
|
||||
use crate::flags::Flags;
|
||||
use crate::meta::FileType;
|
||||
use ansi_term::ANSIString;
|
||||
use color::ColoredString;
|
||||
use flags::Flags;
|
||||
use meta::FileType;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Indicator(&'static str);
|
||||
|
@ -34,8 +34,8 @@ impl Indicator {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::Indicator;
|
||||
use flags::Flags;
|
||||
use meta::FileType;
|
||||
use crate::flags::Flags;
|
||||
use crate::meta::FileType;
|
||||
|
||||
#[test]
|
||||
fn test_directory_indicator() {
|
||||
|
|
|
@ -15,7 +15,7 @@ pub use self::owner::Owner;
|
|||
pub use self::permissions::Permissions;
|
||||
pub use self::size::Size;
|
||||
pub use self::symlink::SymLink;
|
||||
pub use icon::Icons;
|
||||
pub use crate::icon::Icons;
|
||||
|
||||
use std::fs::read_link;
|
||||
use std::io::{Error, ErrorKind};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use color::{ColoredString, Colors, Elem};
|
||||
use icon::Icons;
|
||||
use meta::filetype::FileType;
|
||||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use crate::icon::Icons;
|
||||
use crate::meta::filetype::FileType;
|
||||
use std::cmp::{Ordering, PartialOrd};
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -90,11 +90,11 @@ impl PartialEq for Name {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::Name;
|
||||
use crate::color::{self, Colors};
|
||||
use crate::icon::{self, Icons};
|
||||
use crate::meta::FileType;
|
||||
use crate::meta::Permissions;
|
||||
use ansi_term::Colour;
|
||||
use color::{self, Colors};
|
||||
use icon::{self, Icons};
|
||||
use meta::FileType;
|
||||
use meta::Permissions;
|
||||
use std::cmp::Ordering;
|
||||
use std::fs::{self, File};
|
||||
use std::os::unix::fs::symlink;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use color::{ColoredString, Colors, Elem};
|
||||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use std::fs::Metadata;
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
use users::{get_group_by_gid, get_user_by_uid};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use ansi_term::ANSIStrings;
|
||||
use color::{ColoredString, Colors, Elem};
|
||||
use std::fs::Metadata;
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use color::{ColoredString, Colors, Elem};
|
||||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use std::fs::Metadata;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::color::{ColoredString, Colors, Elem};
|
||||
use ansi_term::{ANSIString, ANSIStrings};
|
||||
use color::{ColoredString, Colors, Elem};
|
||||
use std::fs::read_link;
|
||||
use std::path::Path;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use flags::{DirOrderFlag, Flags, SortFlag, SortOrder};
|
||||
use meta::{FileType, Meta};
|
||||
use crate::flags::{DirOrderFlag, Flags, SortFlag, SortOrder};
|
||||
use crate::meta::{FileType, Meta};
|
||||
use std::cmp::Ordering;
|
||||
|
||||
pub fn by_meta(a: &Meta, b: &Meta, flags: Flags) -> Ordering {
|
||||
|
@ -77,7 +77,7 @@ fn by_date_with_files_first(a: &Meta, b: &Meta, flags: Flags) -> Ordering {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use flags::Flags;
|
||||
use crate::flags::Flags;
|
||||
use std::fs::{create_dir, File};
|
||||
use std::process::Command;
|
||||
use tempdir::TempDir;
|
||||
|
|
Loading…
Reference in a new issue