From 6272a7eee2349788be6591006f0004b2902d157f3ef02de1c93844fbe1fd75f8 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Mon, 6 May 2024 00:00:00 +0000 Subject: Remove unnecessary type declarations --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index feba85f..b45cd54 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,7 +63,7 @@ fn print_square(lock: &mut StdoutLock, is_opaque: bool) { /// ``` pub fn generate(width: usize, height: usize, skew: Option) { // skew=0.5 generates the most random-looking patterns - let skew: f64 = skew.unwrap_or(0.5); + let skew = skew.unwrap_or(0.5); assert!(width >= 1, "Width must be a positive number!"); assert!(height >= 1, "Height must be a positive number!"); @@ -92,7 +92,7 @@ pub fn generate(width: usize, height: usize, skew: Option) { // Precomputed values to facilitate alternating between stitch presence and stitch absence let mut alt_bits: Vec = Vec::with_capacity(width); - let mut alternator: bool = false; + let mut alternator = false; for _ in 0..alt_bits.capacity() { alt_bits.push(alternator); alternator = !alternator; @@ -101,7 +101,7 @@ pub fn generate(width: usize, height: usize, skew: Option) { /* The first square is always opaque to prevent invisible 1xN or Nx1 patterns. Invisible * patterns must be prevented so that users don't mistakenly conclude that the function does * not work. */ - let first_square: bool = true; + let first_square = true; let mut cur_row: Vec = Vec::with_capacity(width); -- cgit v1.2.3