mirror of
https://github.com/notohh/rustlings.git
synced 2025-10-08 19:48:39 -04:00
Done macro
This commit is contained in:
parent
9691c3cb55
commit
e5efc68a91
5 changed files with 152 additions and 7 deletions
src
23
src/main.rs
23
src/main.rs
|
@ -27,6 +27,28 @@ mod project;
|
|||
mod run;
|
||||
mod verify;
|
||||
|
||||
struct EmbeddedFile {
|
||||
path: &'static str,
|
||||
content: &'static [u8],
|
||||
}
|
||||
|
||||
struct EmbeddedFlatDir {
|
||||
path: &'static str,
|
||||
readme: EmbeddedFile,
|
||||
content: Vec<EmbeddedFile>,
|
||||
}
|
||||
|
||||
struct ExercisesDir {
|
||||
readme: EmbeddedFile,
|
||||
files: Vec<EmbeddedFile>,
|
||||
dirs: Vec<EmbeddedFlatDir>,
|
||||
}
|
||||
|
||||
struct EmbeddedFiles {
|
||||
info_toml_content: &'static str,
|
||||
exercises_dir: ExercisesDir,
|
||||
}
|
||||
|
||||
/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code
|
||||
#[derive(Parser)]
|
||||
#[command(version)]
|
||||
|
@ -87,6 +109,7 @@ enum Subcommands {
|
|||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let embedded_files = rustlings_macros::include_files!();
|
||||
let args = Args::parse();
|
||||
|
||||
if args.command.is_none() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue