Skip to content

Commit

Permalink
std panicking: Make decrease() return ()
Browse files Browse the repository at this point in the history
Nothing uses the return value.  This will make the next changes
easier.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
  • Loading branch information
ijackson committed May 7, 2021
1 parent ac888e8 commit a9f43a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ pub mod panic_count {
})
}

pub fn decrease() -> usize {
pub fn decrease() {
GLOBAL_PANIC_COUNT.fetch_sub(1, Ordering::Relaxed);
LOCAL_PANIC_COUNT.with(|c| {
let next = c.get() - 1;
c.set(next);
next
})
});
}

pub fn get() -> usize {
Expand Down

0 comments on commit a9f43a2

Please sign in to comment.