Skip to content

Commit 089aac9

Browse files
committed
atomic, Cargo.toml: Update for arc-swap 1.0.0
Since there is no Cargo.lock file checked in any user of this crate will use the latest version of arc-swap, now at 1.0.0, which has a slightly changed API. Update the dependency to 1.0.0 and port the guard logic to the new API. Signed-off-by: Rob Bradford <[email protected]>
1 parent fbc7350 commit 089aac9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ backend-atomic = ["arc-swap"]
1717

1818
[dependencies]
1919
libc = ">=0.2.39"
20-
arc-swap = { version = ">=0.4.5", optional = true }
20+
arc-swap = { version = ">=1.0.0", optional = true }
2121

2222
[target.'cfg(windows)'.dependencies.winapi]
2323
version = ">=0.3"

src/atomic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<M: GuestMemory> GuestMemoryAtomic<M> {
5252
Arc::new(map).into()
5353
}
5454

55-
fn load(&self) -> Guard<'static, Arc<M>> {
55+
fn load(&self) -> Guard<Arc<M>> {
5656
self.inner.0.load()
5757
}
5858

@@ -90,7 +90,7 @@ impl<M: GuestMemory> GuestAddressSpace for GuestMemoryAtomic<M> {
9090
/// access memory.
9191
#[derive(Debug)]
9292
pub struct GuestMemoryLoadGuard<M: GuestMemory> {
93-
guard: Guard<'static, Arc<M>>,
93+
guard: Guard<Arc<M>>,
9494
}
9595

9696
impl<M: GuestMemory> GuestMemoryLoadGuard<M> {

0 commit comments

Comments
 (0)