From 9149cc046d48fa5b025d40bc5640cf7a3c21a07a Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 4 Aug 2022 20:29:01 +0100 Subject: [PATCH] Extract publish function to a new module --- tools/src/main.rs | 8 +++----- tools/src/publish.rs | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 tools/src/publish.rs diff --git a/tools/src/main.rs b/tools/src/main.rs index 26490abe..50d4ed88 100644 --- a/tools/src/main.rs +++ b/tools/src/main.rs @@ -1,5 +1,7 @@ use clap::{command, Parser}; +mod publish; + #[derive(Parser, Debug)] struct PublishAllCratesArgs {} @@ -12,11 +14,7 @@ fn main() { .get_matches(); match matches.subcommand() { - Some(("publish", _)) => publish(), + Some(("publish", _)) => publish::publish(), _ => unreachable!("Exhausted list of subcommands and subcommand_required prevents `None`"), } } - -fn publish() { - println!("publishing!"); -} diff --git a/tools/src/publish.rs b/tools/src/publish.rs new file mode 100644 index 00000000..d3fb88a2 --- /dev/null +++ b/tools/src/publish.rs @@ -0,0 +1,3 @@ +pub fn publish() { + println!("Publish!"); +}