mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-25 23:04:17 -05:00
Document dev commands
This commit is contained in:
parent
4ce2714da1
commit
86684b7fc9
2 changed files with 8 additions and 2 deletions
|
@ -11,12 +11,17 @@ mod update;
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
pub enum DevCommands {
|
pub enum DevCommands {
|
||||||
|
/// Create a new project for third-party Rustlings exercises
|
||||||
New {
|
New {
|
||||||
|
/// The path to create the project in
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
|
/// Don't initialize a Git repository in the project directory
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
no_git: bool,
|
no_git: bool,
|
||||||
},
|
},
|
||||||
|
/// Run checks on the exercises
|
||||||
Check,
|
Check,
|
||||||
|
/// Update the `Cargo.toml` file for the exercises
|
||||||
Update,
|
Update,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct Args {
|
||||||
enum Subcommands {
|
enum Subcommands {
|
||||||
/// Initialize Rustlings
|
/// Initialize Rustlings
|
||||||
Init,
|
Init,
|
||||||
/// Run a single exercise. Runs the next pending exercise if the exercise name is not specified.
|
/// Run a single exercise. Runs the next pending exercise if the exercise name is not specified
|
||||||
Run {
|
Run {
|
||||||
/// The name of the exercise
|
/// The name of the exercise
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
|
@ -64,11 +64,12 @@ enum Subcommands {
|
||||||
/// The name of the exercise
|
/// The name of the exercise
|
||||||
name: String,
|
name: String,
|
||||||
},
|
},
|
||||||
/// Show a hint. Shows the hint of the next pending exercise if the exercise name is not specified.
|
/// Show a hint. Shows the hint of the next pending exercise if the exercise name is not specified
|
||||||
Hint {
|
Hint {
|
||||||
/// The name of the exercise
|
/// The name of the exercise
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
},
|
},
|
||||||
|
/// Commands for developing (third-party) Rustlings exercises
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
Dev(DevCommands),
|
Dev(DevCommands),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue