Skip to content

Commit ec7f5a2

Browse files
committed
Remove duplicative check on warnings that didn't need to exist
1 parent 99e8fe5 commit ec7f5a2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/ghci/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -999,10 +999,6 @@ impl Ghci {
999999
return;
10001000
}
10011001

1002-
if !self.warning_tracker.has_warnings() {
1003-
return;
1004-
}
1005-
10061002
// Create a set of file paths that were compiled in this cycle
10071003
// Use relative paths for comparison since GHC reports relative paths
10081004
let compiled_files: HashSet<_> = log
@@ -1027,10 +1023,7 @@ impl Ghci {
10271023
/// Display all tracked warnings to the user with GHC-matching colors.
10281024
#[instrument(skip_all, level = "trace")]
10291025
async fn display_tracked_warnings(&self) {
1030-
if !self.warning_tracker.has_warnings() {
1031-
return;
1032-
}
1033-
1026+
// Single iteration - no need to check has_warnings() first
10341027
for file_warnings in self.warning_tracker.get_all_warnings().values() {
10351028
for warning in file_warnings {
10361029
warning.display_colored();

0 commit comments

Comments
 (0)