Skip to content

Commit

Permalink
Update: refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayoung7 committed Mar 22, 2024
1 parent 3b8f482 commit d3201fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bin/firework/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use glam::Vec2;
use rand::{seq::IteratorRandom, thread_rng, Rng};

pub fn dyn_gen(fm: &mut FireworkManager, width: u16, height: u16, enable_gradient: bool) {
let colors = vec![
let colors = [
vec![
(255, 102, 75),
(144, 56, 67),
Expand Down
2 changes: 1 addition & 1 deletion src/bin/firework/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() -> Result<()> {
let mut is_running = true;
let cli = Cli::parse();
if let Some(f) = cli.fps {
if f < 5 || f > 30 {
if !(5..=30).contains(&f) {
return Err(Error::new(
std::io::ErrorKind::Other,
"Invalid fps value! Valid fps range: 5~30",
Expand Down

0 comments on commit d3201fd

Please sign in to comment.