Compare commits

..

5 Commits

Author SHA1 Message Date
andy.boot
dbd18f90e7 docs: update release procedure
Previously I accidentally tagged a release before building it leading
to an out of date Cargo.lock file.
2024-07-17 19:35:44 +01:00
andy.boot
dad88ad660 version: increment version 2024-07-17 19:35:44 +01:00
andy.boot
00a7c410a0 ci: fix warning in windows build 2024-07-17 19:35:44 +01:00
andy.boot
1ab0b2f531 refactor: rename variable 2024-07-17 19:35:44 +01:00
andy.boot
c09073151d fix: perf issues with v1.1.0
Bring performance back
2024-07-17 19:16:46 +01:00
6 changed files with 16 additions and 10 deletions

2
Cargo.lock generated
View File

@@ -303,7 +303,7 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "du-dust"
version = "1.1.0"
version = "1.1.1"
dependencies = [
"ansi_term",
"assert_cmd",

View File

@@ -1,7 +1,7 @@
[package]
name = "du-dust"
description = "A more intuitive version of du"
version = "1.1.0"
version = "1.1.1"
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
edition = "2021"
readme = "README.md"

View File

@@ -1,16 +1,21 @@
# ----------- To do a release ---------
# ----------- Pre release ---------
# Compare times of runs to check no drastic slow down:
# hyperfine 'target/release/dust /home/andy'
# hyperfine 'dust /home/andy'
# edit version in cargo.toml
# ----------- Release ---------
# inc version in cargo.toml
# cargo build --release
# commit changed files
# merge to master in github
# tag a commit and push (increment version in Cargo.toml first):
# git tag v0.4.5
# git push origin v0.4.5
# cargo publish to put it in crates.io
# To install locally [Do before pushing it]
# Optional: To install locally
#cargo install --path .

View File

@@ -1,6 +1,6 @@
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.TH Dust 1 "Dust 1.1.0"
.TH Dust 1 "Dust 1.1.1"
.SH NAME
Dust \- Like du but more intuitive
.SH SYNOPSIS
@@ -124,4 +124,4 @@ Print version
[\fIPATH\fR]
.SH VERSION
v1.1.0
v1.1.1

View File

@@ -114,7 +114,7 @@ fn recursive_rebuilder(allowed_nodes: &HashMap<&Path, &Node>, current: &Node) ->
.map(|c| recursive_rebuilder(allowed_nodes, c))
.collect();
build_node(new_children, current)
build_display_node(new_children, current)
}
// Applies all allowed nodes as children to current node
@@ -127,10 +127,10 @@ fn flat_rebuilder(allowed_nodes: HashMap<&Path, &Node>, current: &Node) -> Displ
children: vec![],
})
.collect::<Vec<DisplayNode>>();
build_node(new_children, current)
build_display_node(new_children, current)
}
fn build_node(mut new_children: Vec<DisplayNode>, current: &Node) -> DisplayNode {
fn build_display_node(mut new_children: Vec<DisplayNode>, current: &Node) -> DisplayNode {
new_children.sort_by(|lhs, rhs| lhs.cmp(rhs).reverse());
DisplayNode {
name: current.name.clone(),

View File

@@ -2,7 +2,7 @@ use assert_cmd::Command;
use std::ffi::OsStr;
use std::process::Output;
use std::sync::Once;
use std::{fs, io, str};
use std::{io, str};
static INIT: Once = Once::new();
static UNREADABLE_DIR_PATH: &str = "/tmp/unreadable_dir";
@@ -38,6 +38,7 @@ fn copy_test_data(dir: &str) {
fn create_unreadable_directory() -> io::Result<()> {
#[cfg(unix)]
{
use std::fs;
use std::fs::Permissions;
use std::os::unix::fs::PermissionsExt;
fs::create_dir_all(UNREADABLE_DIR_PATH)?;