mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add redundant_else
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
d2b19bb969
commit
a0b72dce22
@@ -234,9 +234,8 @@ impl RateLimiterGroup {
|
||||
Err(e) => {
|
||||
if e.kind() == io::ErrorKind::Interrupted {
|
||||
continue;
|
||||
} else {
|
||||
return Err(Error::Epoll(e));
|
||||
}
|
||||
return Err(Error::Epoll(e));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -168,12 +168,11 @@ impl TokenBucket {
|
||||
self.last_update = Instant::now();
|
||||
// No need to continue to the refill process, we still have burst budget to consume from.
|
||||
return BucketReduction::Success;
|
||||
} else {
|
||||
// We still have burst budget for *some* of the tokens requests.
|
||||
// The tokens left unfulfilled will be consumed from current `self.budget`.
|
||||
tokens -= self.one_time_burst;
|
||||
self.one_time_burst = 0;
|
||||
}
|
||||
// We still have burst budget for *some* of the tokens requests.
|
||||
// The tokens left unfulfilled will be consumed from current `self.budget`.
|
||||
tokens -= self.one_time_burst;
|
||||
self.one_time_burst = 0;
|
||||
}
|
||||
|
||||
// Compute time passed since last refill/update.
|
||||
|
||||
Reference in New Issue
Block a user