Skip to content

Commit

Permalink
[core] slight improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbepop committed Nov 26, 2019
1 parent 3f4798c commit 04af16b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/env2/buffer_arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ cfg_if! {
/// threaded we can allow for this unsafe `Sync` implementation to allow
/// for having the global static `BUFFER_ARENA` variable and as long as we
/// are only operating single threaded this shouldn't be unsafe.
// #[cfg(not(feature = "std"))]
unsafe impl Sync for LocalKey {}

impl LocalKey {
Expand Down Expand Up @@ -157,7 +156,7 @@ impl BufferArena {
/// This is only called from the `Drop` implementation of `BufferRef`
/// to return the wrapped buffer back to the global buffer arena instance.
pub(self) fn return_buffer(&self, buffer: Buffer) {
self.in_use.set(self.in_use.get() - 1);
self.in_use.set(self.in_use() - 1);
self.free.borrow_mut().push(buffer)
}

Expand Down

0 comments on commit 04af16b

Please sign in to comment.