Skip to content

Commit

Permalink
Rename 'optimize' action to 'cleanup'
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNerma committed Sep 18, 2022
1 parent def3f9d commit b02a825
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v0.3.5 (2022-09-19)

* **BREAKING:** Renamed the `optimize` action to `cleanup`

## v0.3.4 (2022-09-19)

* **Fix:** Remove entries from the database with `optimize` when a directory became a file
Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jumpy"
version = "0.3.4"
version = "0.3.5"
edition = "2021"

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pub enum Action {
#[clap(about = "Delete a registered directory from the database")]
Del(Del),

#[clap(about = "Optimize the database")]
Optimize(Optimize),
#[clap(about = "Cleanup the database to remove deleted directories")]
Cleanup(Cleanup),

#[clap(about = "Clear the database")]
Clear(Clear),
Expand Down Expand Up @@ -85,7 +85,7 @@ pub struct Del {
}

#[derive(Args)]
pub struct Optimize {}
pub struct Cleanup {}

#[derive(Args)]
pub struct Clear {}
Expand Down
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Index {
}
}

pub fn optimize(&mut self) {
pub fn cleanup(&mut self) {
let mut to_remove = vec![];

for path in self.scored_entries.keys() {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ fn main() {
index.clear();
}

Action::Optimize(Optimize {}) => index.optimize(),
Action::Cleanup(Cleanup {}) => index.cleanup(),

Action::Export(Export {}) => index.export(),

Expand Down

0 comments on commit b02a825

Please sign in to comment.