Remove an unnecessary drop
.
This commit is contained in:
parent
be8fd8b7d0
commit
90862f63f9
1 changed files with 1 additions and 3 deletions
|
@ -33,9 +33,7 @@ fn track_diagnostic(diagnostic: &mut Diagnostic, f: &mut dyn FnMut(&mut Diagnost
|
|||
tls::with_context_opt(|icx| {
|
||||
if let Some(icx) = icx {
|
||||
if let Some(diagnostics) = icx.diagnostics {
|
||||
let mut diagnostics = diagnostics.lock();
|
||||
diagnostics.extend(Some(diagnostic.clone()));
|
||||
std::mem::drop(diagnostics);
|
||||
diagnostics.lock().extend(Some(diagnostic.clone()));
|
||||
}
|
||||
|
||||
// Diagnostics are tracked, we can ignore the dependency.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue