From d52f481be888ce28575fd6f0e80d37d25da5a60a Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:37:03 +0200 Subject: [PATCH] fix: clippy lints for new Rust version (#1329) Fix clippy lints which came from updated Rust version. We now use `Box` for all commands. --- src/commands.rs | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 7ef95a7..d991eb3 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -70,81 +70,81 @@ use self::find::FindCmd; #[derive(clap::Parser, Command, Debug, Runnable)] enum RusticCmd { /// Backup to the repository - Backup(BackupCmd), + Backup(Box), /// Show raw data of files and blobs in a repository - Cat(CatCmd), + Cat(Box), /// Change the repository configuration - Config(ConfigCmd), + Config(Box), /// Generate shell completions - Completions(CompletionsCmd), + Completions(Box), /// Check the repository - Check(CheckCmd), + Check(Box), /// Copy snapshots to other repositories - Copy(CopyCmd), + Copy(Box), /// Compare two snapshots or paths - Diff(DiffCmd), + Diff(Box), /// Open the documentation - Docs(DocsCmd), + Docs(Box), /// Dump the contents of a file within a snapshot to stdout - Dump(DumpCmd), + Dump(Box), /// Find patterns in given snapshots - Find(FindCmd), + Find(Box), /// Remove snapshots from the repository - Forget(ForgetCmd), + Forget(Box), /// Initialize a new repository - Init(InitCmd), + Init(Box), /// Manage keys for a repository - Key(KeyCmd), + Key(Box), /// List repository files by file type - List(ListCmd), + List(Box), /// List file contents of a snapshot - Ls(LsCmd), + Ls(Box), /// Merge snapshots - Merge(MergeCmd), + Merge(Box), /// Show a detailed overview of the snapshots within the repository - Snapshots(SnapshotCmd), + Snapshots(Box), /// Show the configuration which has been read from the config file(s) - ShowConfig(ShowConfigCmd), + ShowConfig(Box), /// Update to the latest stable rustic release #[cfg_attr(not(feature = "self-update"), clap(hide = true))] - SelfUpdate(SelfUpdateCmd), + SelfUpdate(Box), /// Remove unused data or repack repository pack files - Prune(PruneCmd), + Prune(Box), /// Restore (a path within) a snapshot - Restore(RestoreCmd), + Restore(Box), /// Repair a snapshot or the repository index - Repair(RepairCmd), + Repair(Box), /// Show general information about the repository - Repoinfo(RepoInfoCmd), + Repoinfo(Box), /// Change tags of snapshots - Tag(TagCmd), + Tag(Box), /// Start a webdav server which allows to access the repository #[cfg(feature = "webdav")] - Webdav(WebDavCmd), + Webdav(Box), } fn styles() -> Styles {