Extract publish function to a new module

This commit is contained in:
Gwilym Kuiper 2022-08-04 20:29:01 +01:00
parent bf3021c6d9
commit 9149cc046d
2 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,7 @@
use clap::{command, Parser}; use clap::{command, Parser};
mod publish;
#[derive(Parser, Debug)] #[derive(Parser, Debug)]
struct PublishAllCratesArgs {} struct PublishAllCratesArgs {}
@ -12,11 +14,7 @@ fn main() {
.get_matches(); .get_matches();
match matches.subcommand() { match matches.subcommand() {
Some(("publish", _)) => publish(), Some(("publish", _)) => publish::publish(),
_ => unreachable!("Exhausted list of subcommands and subcommand_required prevents `None`"), _ => unreachable!("Exhausted list of subcommands and subcommand_required prevents `None`"),
} }
} }
fn publish() {
println!("publishing!");
}

3
tools/src/publish.rs Normal file
View file

@ -0,0 +1,3 @@
pub fn publish() {
println!("Publish!");
}