summaryrefslogtreecommitdiff
path: root/rust/pin-init/examples
diff options
context:
space:
mode:
Diffstat (limited to 'rust/pin-init/examples')
-rw-r--r--rust/pin-init/examples/mutex.rs2
-rw-r--r--rust/pin-init/examples/pthread_mutex.rs2
-rw-r--r--rust/pin-init/examples/static_init.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/rust/pin-init/examples/mutex.rs b/rust/pin-init/examples/mutex.rs
index 8ed2d3219eb1..35ecb5f68dc3 100644
--- a/rust/pin-init/examples/mutex.rs
+++ b/rust/pin-init/examples/mutex.rs
@@ -218,7 +218,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
- println!("{:?}", &*mtx.lock());
+ println!("{:?}", *mtx.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}
diff --git a/rust/pin-init/examples/pthread_mutex.rs b/rust/pin-init/examples/pthread_mutex.rs
index 4a66316471af..00f457e68827 100644
--- a/rust/pin-init/examples/pthread_mutex.rs
+++ b/rust/pin-init/examples/pthread_mutex.rs
@@ -177,7 +177,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
- println!("{:?}", &*mtx.lock());
+ println!("{:?}", *mtx.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}
diff --git a/rust/pin-init/examples/static_init.rs b/rust/pin-init/examples/static_init.rs
index 906b96c5d4b9..58cd4241b78c 100644
--- a/rust/pin-init/examples/static_init.rs
+++ b/rust/pin-init/examples/static_init.rs
@@ -117,7 +117,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
- println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock());
+ println!("{:?}, {:?}", *mtx.lock(), *COUNT.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}