Fix Rust 1.97 imaging gate lints
This commit is contained in:
@@ -1213,10 +1213,10 @@ impl TokenBucket {
|
||||
if state.content.wrapping_sub(amount) < 0 {
|
||||
return Ok(false);
|
||||
}
|
||||
if let Some(parent) = &self.parent {
|
||||
if !parent.remove_tokens_with_int32(amount)? {
|
||||
return Ok(false);
|
||||
}
|
||||
if let Some(parent) = &self.parent
|
||||
&& !parent.remove_tokens_with_int32(amount)?
|
||||
{
|
||||
return Ok(false);
|
||||
}
|
||||
state.content = state.content.wrapping_sub(amount);
|
||||
Ok(true)
|
||||
|
||||
Reference in New Issue
Block a user