summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryant Mairs <bryantmairs@google.com>2017-12-15 15:13:58 -0800
committerBryant Mairs <bryantmairs@google.com>2017-12-20 07:05:04 -0800
commit7b4402f091ccac878f3cbb772a6df20ba7a7a9e6 (patch)
tree792f2b69481b447bf9d464997b2fa04b01f28378
parentb93c1adabeb093934263c4f7ed11ac0636de8324 (diff)
downloadnix-7b4402f091ccac878f3cbb772a6df20ba7a7a9e6.zip
Use Rc::clone() instead of .clone()
Makes it more clear what's being cloned
-rw-r--r--test/sys/test_aio.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/sys/test_aio.rs b/test/sys/test_aio.rs
index c5f2dbc5..e84d95b5 100644
--- a/test/sys/test_aio.rs
+++ b/test/sys/test_aio.rs
@@ -150,7 +150,7 @@ fn test_aio_suspend() {
let mut rcb = AioCb::from_boxed_slice( f.as_raw_fd(),
8, //offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_READ);
@@ -184,7 +184,7 @@ fn test_read() {
{
let mut aiocb = AioCb::from_boxed_slice( f.as_raw_fd(),
2, //offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_NOP);
@@ -211,7 +211,7 @@ fn test_read_error() {
f.write_all(INITIAL).unwrap();
let mut aiocb = AioCb::from_boxed_slice( f.as_raw_fd(),
-1, //an invalid offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_NOP);
@@ -383,7 +383,7 @@ fn test_lio_listio_wait() {
let mut rcb = AioCb::from_boxed_slice( f.as_raw_fd(),
8, //offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_READ);
@@ -426,7 +426,7 @@ fn test_lio_listio_nowait() {
let mut rcb = AioCb::from_boxed_slice( f.as_raw_fd(),
8, //offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_READ);
@@ -479,7 +479,7 @@ fn test_lio_listio_signal() {
let mut rcb = AioCb::from_boxed_slice( f.as_raw_fd(),
8, //offset
- rbuf.clone(),
+ Rc::clone(&rbuf),
0, //priority
SigevNotify::SigevNone,
LioOpcode::LIO_READ);