-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use enum_dispatch to reduce duplicate code
- Loading branch information
1 parent
d594de5
commit 1ee67c9
Showing
6 changed files
with
13 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
mod cli; | ||
mod process; | ||
mod utils; | ||
pub use cli::{ | ||
Base64Format, Base64SubCommand, HttpSubCommand, Opts, Subcommand, TextSignFormat, | ||
TextSubCommand, | ||
}; | ||
pub use cli::*; | ||
use enum_dispatch::enum_dispatch; | ||
pub use process::*; | ||
pub use utils::*; | ||
|
||
#[allow(async_fn_in_trait)] | ||
#[enum_dispatch] | ||
pub trait CmdExector { | ||
async fn execute(self) -> anyhow::Result<()>; | ||
} |