Rust library to generate static websites
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: clippy

+6 -12
+3 -6
crates/cli/src/logging.rs
··· 25 25 elapsed: Result<Duration, SystemTimeError>, 26 26 options: &FormatElapsedTimeOptions, 27 27 ) -> Result<ColoredString, SystemTimeError> { 28 - let elapsed = match elapsed { 29 - Ok(elapsed) => elapsed, 30 - Err(err) => return Err(err), 31 - }; 28 + let elapsed = elapsed?; 32 29 33 30 let result = match elapsed.as_secs() { 34 31 secs if secs > 60 => { ··· 43 40 millis 44 41 if options 45 42 .millis_red_threshold 46 - .map_or(false, |threshold| millis > threshold) => 43 + .is_some_and(|threshold| millis > threshold) => 47 44 { 48 45 format!("{}ms", millis).red() 49 46 } 50 47 millis 51 48 if options 52 49 .millis_yellow_threshold 53 - .map_or(false, |threshold| millis > threshold) => 50 + .is_some_and(|threshold| millis > threshold) => 54 51 { 55 52 format!("{}ms", millis).yellow() 56 53 }
+3 -6
crates/framework/src/logging.rs
··· 56 56 elapsed: Result<Duration, SystemTimeError>, 57 57 options: &FormatElapsedTimeOptions, 58 58 ) -> Result<ColoredString, SystemTimeError> { 59 - let elapsed = match elapsed { 60 - Ok(elapsed) => elapsed, 61 - Err(err) => return Err(err), 62 - }; 59 + let elapsed = elapsed?; 63 60 64 61 let result = match elapsed.as_secs() { 65 62 secs if secs > options.sec_red_threshold => format!("{}m", secs / 60).red(), ··· 69 66 millis 70 67 if options 71 68 .millis_red_threshold 72 - .map_or(false, |threshold| millis > threshold) => 69 + .is_some_and(|threshold| millis > threshold) => 73 70 { 74 71 format!("{}ms", millis).red() 75 72 } 76 73 millis 77 74 if options 78 75 .millis_yellow_threshold 79 - .map_or(false, |threshold| millis > threshold) => 76 + .is_some_and(|threshold| millis > threshold) => 80 77 { 81 78 format!("{}ms", millis).yellow() 82 79 }