Skip to content

Commit

Permalink
Release 0.4.0, with fmt cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
holmgr committed Jan 23, 2019
1 parent d796d9f commit 118a45e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "cargo-sweep"
description = "A tool for cleaning unused build files created by Cargo"
version = "0.3.0"
version = "0.4.0"
edition = "2018"
authors = ["holmgr <viktor.holmgren@gmail.com>"]
keywords = ["tool", "cli", "cargo"]
Expand Down
8 changes: 5 additions & 3 deletions src/main.rs
Expand Up @@ -250,7 +250,10 @@ fn main() {

if matches.is_present("maxsize") {
// TODO: consider parsing units like GB, KB ...
let size = match matches.value_of("maxsize").and_then(|s| s.parse::<u64>().ok()) {
let size = match matches
.value_of("maxsize")
.and_then(|s| s.parse::<u64>().ok())
{
Some(s) => s * 1024 * 1024,
None => {
error!("maxsize has to be a number");
Expand All @@ -259,8 +262,7 @@ fn main() {
};

for project_path in &paths {
match remove_older_until_fits(project_path, size, dry_run)
{
match remove_older_until_fits(project_path, size, dry_run) {
Ok(cleaned_amount) if dry_run => {
info!("Would clean: {}", format_bytes(cleaned_amount))
}
Expand Down

0 comments on commit 118a45e

Please sign in to comment.