Fix checking if there have been new errors.
This commit is contained in:
parent
a891c72976
commit
b3e30b5fc3
@ -179,9 +179,9 @@ impl Session {
|
||||
pub fn track_errors<F, T>(&self, f: F) -> Result<T, usize>
|
||||
where F: FnOnce() -> T
|
||||
{
|
||||
let mut count = self.err_count();
|
||||
let count = self.err_count();
|
||||
let result = f();
|
||||
count -= self.err_count();
|
||||
let count = self.err_count() - count;
|
||||
if count == 0 {
|
||||
Ok(result)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user