diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-05-06 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-05-06 00:00:00 +0000 |
commit | 6272a7eee2349788be6591006f0004b2902d157f3ef02de1c93844fbe1fd75f8 (patch) | |
tree | a43a611d7d207fb338708353e8f1afc0e8deea65666b85dad03858e1a738e9fa | |
parent | 3e942daf11266345164829d3339c5b78e98d4fde729bd57db94ad38c2f33f7f1 (diff) | |
download | hitomezashi-rs-6272a7eee2349788be6591006f0004b2902d157f3ef02de1c93844fbe1fd75f8.tar.gz hitomezashi-rs-6272a7eee2349788be6591006f0004b2902d157f3ef02de1c93844fbe1fd75f8.zip |
Remove unnecessary type declarations
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,7 +63,7 @@ fn print_square(lock: &mut StdoutLock, is_opaque: bool) { /// ``` pub fn generate(width: usize, height: usize, skew: Option<f64>) { // 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<f64>) { // Precomputed values to facilitate alternating between stitch presence and stitch absence let mut alt_bits: Vec<bool> = 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<f64>) { /* 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<bool> = Vec::with_capacity(width); |