main.rs: Periods in helptext
This commit is contained in:
		
							
								
								
									
										20
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/main.rs
									
									
									
									
									
								
							@@ -12,27 +12,27 @@ use std::{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Options, Hash)]
 | 
					#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Options, Hash)]
 | 
				
			||||||
struct Arguments {
 | 
					struct Arguments {
 | 
				
			||||||
    #[options(help = "Print help text and exit")]
 | 
					    #[options(help = "Print this help message.")]
 | 
				
			||||||
    help: bool,
 | 
					    help: bool,
 | 
				
			||||||
    #[options(help = "Enable behavior incompatible with modern software")]
 | 
					    #[options(help = "Enable behavior incompatible with modern software.")]
 | 
				
			||||||
    pub authentic: bool,
 | 
					    pub authentic: bool,
 | 
				
			||||||
    #[options(
 | 
					    #[options(
 | 
				
			||||||
        long = "break",
 | 
					        long = "break",
 | 
				
			||||||
        help = "Set breakpoints for the emulator to stop at",
 | 
					        help = "Set breakpoints for the emulator to stop at.",
 | 
				
			||||||
        parse(try_from_str = "parse_hex")
 | 
					        parse(try_from_str = "parse_hex")
 | 
				
			||||||
    )]
 | 
					    )]
 | 
				
			||||||
    pub breakpoints: Vec<u16>,
 | 
					    pub breakpoints: Vec<u16>,
 | 
				
			||||||
    #[options(help = "Enable debug mode at startup")]
 | 
					    #[options(help = "Enable debug mode at startup.")]
 | 
				
			||||||
    pub debug: bool,
 | 
					    pub debug: bool,
 | 
				
			||||||
    #[options(help = "Enable pause mode at startup", default = "false")]
 | 
					    #[options(help = "Enable pause mode at startup.", default = "false")]
 | 
				
			||||||
    pub pause: bool,
 | 
					    pub pause: bool,
 | 
				
			||||||
    #[options(help = "Load a ROM to run on Chirp", required, free)]
 | 
					    #[options(help = "Load a ROM to run on Chirp.", required, free)]
 | 
				
			||||||
    pub file: PathBuf,
 | 
					    pub file: PathBuf,
 | 
				
			||||||
    #[options(help = "Set the target framerate", default = "60")]
 | 
					    #[options(help = "Set the target framerate.", default = "60")]
 | 
				
			||||||
    pub frame_rate: u64,
 | 
					    pub frame_rate: u64,
 | 
				
			||||||
    #[options(help = "Set the instructions-per-frame rate", default = "8")]
 | 
					    #[options(help = "Set the instructions-per-frame rate.", default = "8")]
 | 
				
			||||||
    pub speed: usize,
 | 
					    pub speed: usize,
 | 
				
			||||||
    #[options(help = "Run the emulator as fast as possible for `step` instructions")]
 | 
					    #[options(help = "Run the emulator as fast as possible for `step` instructions.")]
 | 
				
			||||||
    pub step: Option<usize>,
 | 
					    pub step: Option<usize>,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -202,4 +202,4 @@ fn parse_hex(value: &str) -> std::result::Result<u16, std::num::ParseIntError> {
 | 
				
			|||||||
/// Transforms a bool into "enabled"/"disabled"
 | 
					/// Transforms a bool into "enabled"/"disabled"
 | 
				
			||||||
fn endis(name: &str, state: bool) -> String {
 | 
					fn endis(name: &str, state: bool) -> String {
 | 
				
			||||||
    format!("{name} {}", if state { "enabled" } else { "disabled" })
 | 
					    format!("{name} {}", if state { "enabled" } else { "disabled" })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user