Skip to content

Commit

Permalink
Fix a blocking clippy suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
  • Loading branch information
FlorentinDUBOIS committed Oct 13, 2022
1 parent f064d8b commit 0e3fffe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/src/command/orders.rs
Expand Up @@ -564,7 +564,7 @@ impl CommandServer {
request_identifier.client, request_identifier.request, id
);

if self.workers.iter().any(|worker| {
if !self.workers.iter().any(|worker| {
worker.id == id
&& worker.run_state != RunState::Stopping
&& worker.run_state != RunState::Stopped
Expand Down
7 changes: 1 addition & 6 deletions lib/src/metrics/writer.rs
Expand Up @@ -203,16 +203,11 @@ impl MetricsWriter {
self.buf.drain(..written);
}

if flush_entire_buffer {
if flush_entire_buffer || written > self.last_newline {
self.last_newline = 0;
self.last_packet_start = 0;
} else if written > self.last_newline {
self.last_newline = 0;
//FIXME
self.last_packet_start = 0;
} else {
self.last_newline -= written;
//FIXME
self.last_packet_start = 0;
}

Expand Down

0 comments on commit 0e3fffe

Please sign in to comment.