forked from StrafesNET/strafe-project
roblox_emulator: use match guard
This commit is contained in:
parent
c14f8975fc
commit
045e540020
@ -59,8 +59,8 @@ fn schedule_thread(lua:&mlua::Lua,dt:mlua::Value)->Result<(),mlua::Error>{
|
|||||||
match delay.classify(){
|
match delay.classify(){
|
||||||
std::num::FpCategory::Nan=>Err(mlua::Error::runtime("NaN"))?,
|
std::num::FpCategory::Nan=>Err(mlua::Error::runtime("NaN"))?,
|
||||||
// cases where the number is too large to schedule
|
// cases where the number is too large to schedule
|
||||||
std::num::FpCategory::Infinite=>return Ok(()),
|
std::num::FpCategory::Infinite
|
||||||
std::num::FpCategory::Normal=>if (u64::MAX as f64)<delay{
|
|std::num::FpCategory::Normal if (u64::MAX as f64)<delay=>{
|
||||||
return Ok(());
|
return Ok(());
|
||||||
},
|
},
|
||||||
_=>(),
|
_=>(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user