From afe372a3d2426d86081b2f0b79c62777dd35bbb2 Mon Sep 17 00:00:00 2001 From: Benjamin Nguyen Date: Wed, 8 Mar 2023 22:05:46 -0800 Subject: [PATCH] reorg --- src/fs/{erdtree => }/disk_usage.rs | 0 src/fs/erdtree/mod.rs | 3 --- src/fs/erdtree/node.rs | 8 ++++---- src/fs/erdtree/tree/mod.rs | 6 ++++-- src/fs/mod.rs | 3 +++ 5 files changed, 11 insertions(+), 9 deletions(-) rename src/fs/{erdtree => }/disk_usage.rs (100%) diff --git a/src/fs/erdtree/disk_usage.rs b/src/fs/disk_usage.rs similarity index 100% rename from src/fs/erdtree/disk_usage.rs rename to src/fs/disk_usage.rs diff --git a/src/fs/erdtree/mod.rs b/src/fs/erdtree/mod.rs index 5c8da342..7c398e26 100644 --- a/src/fs/erdtree/mod.rs +++ b/src/fs/erdtree/mod.rs @@ -1,6 +1,3 @@ -/// Operations that decide how to present info about disk usage. -pub mod disk_usage; - /// Contains components of the [`Tree`] data structure that derive from [`DirEntry`]. /// /// [`Tree`]: tree::Tree diff --git a/src/fs/erdtree/node.rs b/src/fs/erdtree/node.rs index 06328737..bc74ec5a 100644 --- a/src/fs/erdtree/node.rs +++ b/src/fs/erdtree/node.rs @@ -1,8 +1,8 @@ -use super::{super::inode::Inode, disk_usage::DiskUsage, get_ls_colors}; -use crate::{ - fs::erdtree::disk_usage::FileSize, - icons::{self, icon_from_ext, icon_from_file_name, icon_from_file_type}, +use super::{ + super::{disk_usage::{DiskUsage, FileSize}, inode::Inode}, + get_ls_colors, }; +use crate::icons::{self, icon_from_ext, icon_from_file_name, icon_from_file_type}; use ansi_term::Color; use ansi_term::Style; use ignore::DirEntry; diff --git a/src/fs/erdtree/tree/mod.rs b/src/fs/erdtree/tree/mod.rs index 4b5568d3..a30b6e41 100644 --- a/src/fs/erdtree/tree/mod.rs +++ b/src/fs/erdtree/tree/mod.rs @@ -1,6 +1,8 @@ use super::{ - super::error::Error, - disk_usage::{DiskUsage, FileSize}, + super::{ + disk_usage::{DiskUsage, FileSize}, + error::Error, + }, node::{Node, NodePrecursor}, order::Order, }; diff --git a/src/fs/mod.rs b/src/fs/mod.rs index 44722e8e..137a852e 100644 --- a/src/fs/mod.rs +++ b/src/fs/mod.rs @@ -1,3 +1,6 @@ +/// Operations that decide how to present info about disk usage. +pub mod disk_usage; + /// Errors related to filesystem traversal. pub mod error;