diff options
| author | brian cully <bjc@spork.org> | 2025-12-29 20:44:00 -0500 |
|---|---|---|
| committer | brian cully <bjc@spork.org> | 2025-12-29 20:44:00 -0500 |
| commit | b2fe275aa4486cfcb54e8149878402f64b0c84dd (patch) | |
| tree | 0b06dc86ea049377f9b06bc252ae393f7414dae5 /src/point.rs | |
| parent | 4c3b55529838e8c9d42f9ebb43c95f5020f22b21 (diff) | |
| download | polyring-b2fe275aa4486cfcb54e8149878402f64b0c84dd.tar.gz polyring-b2fe275aa4486cfcb54e8149878402f64b0c84dd.zip | |
wasm: string interpolation
Diffstat (limited to 'src/point.rs')
| -rw-r--r-- | src/point.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/point.rs b/src/point.rs index 18d3d5f..34cdb69 100644 --- a/src/point.rs +++ b/src/point.rs @@ -3,12 +3,12 @@ use crate::state::{MAX_SPEED, TAU}; const POINT_RADIUS: f64 = 0.01; fn rand_color() -> String { - format!( - "rgb({} {} {})", + let [r, g, b] = [ fastrand::u8(0..255), fastrand::u8(0..255), - fastrand::u8(0..255) - ) + fastrand::u8(0..255), + ]; + format!("rgb({r} {g} {b})",) } #[derive(Clone, Debug)] |
