rename module entry -> dir_entry

This commit is contained in:
Jonathan Goren 2021-11-30 09:51:16 +02:00
parent 1153e3e155
commit 3dc61b5f28
7 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@ use std::sync::{Arc, Mutex};
use crossbeam_channel::Receiver;
use crate::entry::DirEntry;
use crate::dir_entry::DirEntry;
use crate::error::print_error;
use crate::exit_codes::{merge_exitcodes, ExitCode};
use crate::walk::WorkerResult;

View File

@ -9,7 +9,7 @@ use std::path::{Path, PathBuf};
use normpath::PathExt;
use crate::entry;
use crate::dir_entry;
pub fn path_absolute_form(path: &Path) -> io::Result<PathBuf> {
if path.is_absolute() {
@ -51,7 +51,7 @@ pub fn is_executable(_: &fs::Metadata) -> bool {
false
}
pub fn is_empty(entry: &entry::DirEntry) -> bool {
pub fn is_empty(entry: &dir_entry::DirEntry) -> bool {
if let Some(file_type) = entry.file_type() {
if file_type.is_dir() {
if let Ok(mut entries) = fs::read_dir(entry.path()) {

View File

@ -1,4 +1,4 @@
use crate::entry;
use crate::dir_entry;
use crate::filesystem;
/// Whether or not to show
@ -14,7 +14,7 @@ pub struct FileTypes {
}
impl FileTypes {
pub fn should_ignore(&self, entry: &entry::DirEntry) -> bool {
pub fn should_ignore(&self, entry: &dir_entry::DirEntry) -> bool {
if let Some(ref entry_type) = entry.file_type() {
(!self.files && entry_type.is_file())
|| (!self.directories && entry_type.is_dir())

View File

@ -1,6 +1,6 @@
mod app;
mod config;
mod entry;
mod dir_entry;
mod error;
mod exec;
mod exit_codes;

View File

@ -6,7 +6,7 @@ use lscolors::{Indicator, LsColors, Style};
use once_cell::sync::Lazy;
use crate::config::Config;
use crate::entry::DirEntry;
use crate::dir_entry::DirEntry;
use crate::error::print_error;
use crate::exit_codes::ExitCode;
use crate::filesystem::strip_current_dir;

View File

@ -15,7 +15,7 @@ use ignore::{self, WalkBuilder};
use regex::bytes::Regex;
use crate::config::Config;
use crate::entry::DirEntry;
use crate::dir_entry::DirEntry;
use crate::error::print_error;
use crate::exec;
use crate::exit_codes::{merge_exitcodes, ExitCode};