Skip to content

Commit

Permalink
refactor(cache): remove interactive cache remove
Browse files Browse the repository at this point in the history
  • Loading branch information
norskeld committed Nov 23, 2024
1 parent 88be884 commit 62bcf35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ pub enum CacheCommand {
Remove {
/// List of cache entries to remove.
entries: Vec<String>,
/// Interactive mode.
#[arg(short, long)]
interactive: bool,
/// Remove all cache entries.
#[arg(short, long, conflicts_with_all = ["entries", "interactive"])]
all: bool,
Expand Down Expand Up @@ -306,11 +303,9 @@ impl App {

match command {
| CacheCommand::List => Ok(cache.list()?),
| CacheCommand::Remove { entries, interactive, all } => {
| CacheCommand::Remove { entries, all } => {
if all {
cache.remove_all()
} else if interactive {
cache.remove_interactive()
} else {
cache.remove(entries)
}
Expand Down
5 changes: 0 additions & 5 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,4 @@ impl Cache {

Ok(())
}

/// Removes cache entries interactively.
pub fn remove_interactive(&mut self) -> miette::Result<()> {
Ok(())
}
}

0 comments on commit 62bcf35

Please sign in to comment.