Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Sep 11, 2023
1 parent 47f1f24 commit 7993fe5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ghcid-ng/src/ghci/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,15 @@ impl Ghci {
&mut self,
path: &Utf8Path,
) -> miette::Result<Option<CompilationResult>> {
let messages = self.stdin.add_module(&mut self.stdout, &path).await?;
let messages = self.stdin.add_module(&mut self.stdout, path).await?;

let result = self.process_ghc_messages(messages).await?;

match result {
Some(CompilationResult::Ok) => {
self.modules.insert_source_path(&path)?;
}
_ => {
// Compilation failed or otherwise didn't print a summary, so we don't want to add
// the module to the module set.
}
if let Some(CompilationResult::Ok) = result {
self.modules.insert_source_path(path)?;
}
// Otherwise, compilation failed or otherwise didn't print a summary, so we don't want to
// add the module to the module set.

Ok(result)
}
Expand Down

0 comments on commit 7993fe5

Please sign in to comment.