diff --git a/README.md b/README.md index bc6ee9c..bca6ae6 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,7 @@ Options: [default: 4] -w, --width - Width expressed as text-columns, this parameter will calculate the scale factor for you. - Overrides `scale` parameter even when specified. - - [default: disabled] + Enstablish how much wide is the output images, in columns. Overrides `scale` -b, --background The background color to use diff --git a/src/args.rs b/src/args.rs index 8a9d673..88ff59f 100644 --- a/src/args.rs +++ b/src/args.rs @@ -19,7 +19,7 @@ pub mod args { /// The output scale (1 is the original size) #[arg(short, long, default_value = "4")] pub scale: u32, - // Enstablish how much wide is the output images, in columns. Overrides `scale` + /// Enstablish how much wide is the output images, in columns. Overrides `scale` #[arg(short, long, default_value= None )] pub width: Option, /// The background color to use diff --git a/src/ascii_processor.rs b/src/ascii_processor.rs index 2a88560..7c61fc8 100644 --- a/src/ascii_processor.rs +++ b/src/ascii_processor.rs @@ -66,6 +66,7 @@ fn get_character( /// Determine how much scale to use in presence of `width` parameters, /// otherwise returns regular `scale` parameter per default behaviour /// +#[inline] fn calculate_scale(args: &Arguments, dimensions: (u32, u32)) -> u32 { args.width.map_or_else(|| args.scale, |v| dimensions.0 / v) }