Skip to content

Commit

Permalink
lib: Dispatch to monomorphic function
Browse files Browse the repository at this point in the history
This mirrors ostreedev/ostree-rs-ext#515

From looking at cargo bloat.
  • Loading branch information
cgwalters committed Aug 16, 2023
1 parent d2bec9b commit 02d761a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,11 @@ where
I: IntoIterator,
I::Item: Into<OsString> + Clone,
{
let opt = Opt::parse_from(args);
run_from_opt(Opt::parse_from(args)).await
}

/// Internal (non-generic/monomorphized) primary CLI entrypoint
async fn run_from_opt(opt: Opt) -> Result<()> {
match opt {
Opt::Upgrade(opts) => upgrade(opts).await,
Opt::Switch(opts) => switch(opts).await,
Expand Down

0 comments on commit 02d761a

Please sign in to comment.