Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Jun 15, 2023
1 parent 4c9c984 commit 982b972
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Rhai Release Notes
Version 1.15.0
==============

Bug fixes
---------

* Fixes a concurrency error in static hashing keys (thanks [`garypen`](https://github.com/garypen)!).

Enhancements
------------

Expand Down
6 changes: 3 additions & 3 deletions src/config/hashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ impl HokmaLock {
pub fn write(&'static self) -> WhenTheHokmaSuppression {
loop {
// We are only interested in error results
if let Err(previous) = self
.lock
.compare_exchange(1, 1, Ordering::SeqCst, Ordering::SeqCst)
if let Err(previous) =
self.lock
.compare_exchange(1, 1, Ordering::SeqCst, Ordering::SeqCst)
{
// If we failed, previous cannot be 1
return WhenTheHokmaSuppression {
Expand Down

0 comments on commit 982b972

Please sign in to comment.