diff --git a/src/output.rs b/src/output.rs index 772e29a..f51d41f 100644 --- a/src/output.rs +++ b/src/output.rs @@ -93,7 +93,8 @@ fn print_entry_colorized( } if wants_to_quit.load(Ordering::Relaxed) { - stdout.flush()?; + // Ignore any errors on flush, because we're about to exit anyway + let _ = stdout.flush(); ExitCode::KilledBySigint.exit(); } diff --git a/src/walk.rs b/src/walk.rs index 61e38e4..f0cee6d 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -280,6 +280,7 @@ fn spawn_receiver( } } } + num_results += 1; if let Some(max_results) = config.max_results { if num_results >= max_results { @@ -294,6 +295,7 @@ fn spawn_receiver( } } } + // If we have finished fast enough (faster than max_buffer_time), we haven't streamed // anything to the console, yet. In this case, sort the results and print them: buffer.sort();