Skip to content

Commit fd11365

Browse files
committed
chore(git): merge from master
2 parents 3645048 + 6fb67db commit fd11365

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ The benchmark was generated by [a GitHub Workflow](https://github.com/KSXGitHub/
6060
## Limitations
6161

6262
* Ignorant of reflinks (from COW filesystems such as BTRFS and ZFS).
63-
* Do not follow symbolic links.
64-
* Do not differentiate filesystem: Mounted folders are counted as normal folders.
63+
* Does not follow symbolic links.
64+
* Does not differentiate filesystems: Mounted folders are counted as normal folders.
6565
* The runtime is optimized at the expense of binary size.
6666

6767
## Usage
@@ -134,7 +134,7 @@ The [parallel-disk-usage crate](https://crates.io/crates/parallel-disk-usage) is
134134

135135
Alternatively, the `pdu` command provides `--json-input` flag and `--json-output` flag. The `--json-output` flag converts disk usage data into JSON and the `--json-input` flag turns said JSON into visualization. These 2 flags allow integration with other CLI tools (via pipe, as per the UNIX philosophy).
136136

137-
Beware that the structure of the JSON tree differs depends on the number of file/directory names that were provided (as CLI arguments):
137+
Beware that the structure of the JSON tree differs depending on the number of file/directory names that were provided (as CLI arguments):
138138
* If there are only 0 or 1 file/directory names, the name of the tree root would be a real path (either `.` or the provided name).
139139
* If there are 2 or more file/directory names, the name of the tree root would be `(total)` (which is not a real path), and the provided names would correspond to the children of the tree root.
140140

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl App {
158158
if cfg!(unix) && self.args.deduplicate_hardlinks && self.args.files.len() > 1 {
159159
// Hardlinks deduplication doesn't work properly if there are more than 1 paths pointing to
160160
// the same tree or if a path points to a subtree of another path. Therefore, we must find
161-
// and remove such overlapping paths before they cause problem.
161+
// and remove such overlapping paths before they cause problems.
162162
use overlapping_arguments::{remove_overlapping_paths, RealApi};
163163
remove_overlapping_paths::<RealApi>(&mut self.args.files);
164164
}

src/app/overlapping_arguments.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Api for RealApi {
4343

4444
/// Hardlinks deduplication doesn't work properly if there are more than 1 paths pointing to
4545
/// the same tree or if a path points to a subtree of another path. Therefore, we must find
46-
/// and remove such overlapping paths before they cause problem.
46+
/// and remove such overlapping paths before they cause problems.
4747
pub fn remove_overlapping_paths<Api: self::Api>(arguments: &mut Vec<Api::Argument>) {
4848
let to_remove = find_overlapping_paths_to_remove::<Api>(arguments);
4949
remove_items_from_vec_by_indices(arguments, &to_remove);
@@ -102,14 +102,14 @@ pub fn remove_items_from_vec_by_indices<Item>(vec: &mut Vec<Item>, indices: &Has
102102
return;
103103
}
104104

105-
// Optimization: If there is only 1 element to remove, shifting elements would be cheaper than reallocate a whole array.
105+
// Optimization: If there is only 1 element to remove, shifting elements would be cheaper than reallocating a whole array.
106106
if indices.len() == 1 {
107107
let index = *indices.iter().next().unwrap();
108108
vec.remove(index);
109109
return;
110110
}
111111

112-
// Default: If there are more than 1 elements to remove, just copy the whole array without them.
112+
// Default: If there are more than 1 element to remove, just copy the whole array without them.
113113
*vec = vec
114114
.pipe(take)
115115
.into_iter()

src/args/threads.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum Threads {
1818
Fixed(NonZeroUsize),
1919
}
2020

21-
/// Error that occurs when parsing a string to as [`Threads`].
21+
/// Error that occurs when parsing a string as [`Threads`].
2222
#[derive(Debug, Display, Clone, PartialEq, Eq, Error)]
2323
#[non_exhaustive]
2424
pub enum FromStrError {

src/fs_tree_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ where
5454
pub hardlinks_recorder: &'a HardlinksRecorder,
5555
/// Reports progress to external system.
5656
pub reporter: &'a Report,
57-
/// Deepest level of descendent display in the graph. The sizes beyond the max depth still count toward total.
57+
/// Deepest level of descendant display in the graph. The sizes beyond the max depth still count toward total.
5858
pub max_depth: u64,
5959
}
6060

src/tree_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where
2424
pub get_info: GetInfo,
2525
/// Function to join parent's `path` with a child's name to make the child's `name`.
2626
pub join_path: JoinPath,
27-
/// Deepest level of descendent to store as arrays. The sizes beyond the max depth still count toward total.
27+
/// Deepest level of descendant to store as arrays. The sizes beyond the max depth still count toward total.
2828
pub max_depth: u64,
2929
}
3030

src/visualizer/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ where
2222
Name: Display,
2323
Size: size::Size + Into<u64>,
2424
{
25-
/// Create ASCII rows that visualize of the [tree](crate::data_tree::DataTree), such rows
25+
/// Create ASCII rows that visualize the [tree](crate::data_tree::DataTree), such rows
2626
/// are meant to be printed to a terminal screen.
2727
pub fn rows(mut self) -> Vec<String> {
2828
let initial_table = render_initial(self);

0 commit comments

Comments
 (0)