Fix warning: `...` range patterns are deprecated

This commit is contained in:
ice_iix 2019-11-02 14:46:33 -07:00
parent c88631b124
commit 49f2582a50
1 changed files with 5 additions and 5 deletions

View File

@ -470,11 +470,11 @@ impl super::Screen for ServerList {
// TODO: switch to as_millis() experimental duration_as_u128 #50202 once available?
let ping_ms = (res.ping.subsec_nanos() as f64)/1000000.0 + (res.ping.as_secs() as f64)*1000.0;
let y = match ping_ms.round() as u64 {
_x @ 0 ... 75 => 16.0 / 256.0,
_x @ 76 ... 150 => 24.0 / 256.0,
_x @ 151 ... 225 => 32.0 / 256.0,
_x @ 226 ... 350 => 40.0 / 256.0,
_x @ 351 ... 999 => 48.0 / 256.0,
_x @ 0 ..= 75 => 16.0 / 256.0,
_x @ 76 ..= 150 => 24.0 / 256.0,
_x @ 151 ..= 225 => 32.0 / 256.0,
_x @ 226 ..= 350 => 40.0 / 256.0,
_x @ 351 ..= 999 => 48.0 / 256.0,
_ => 56.0 / 256.0,
};
s.ping.borrow_mut().texture_coords.1 = y;