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