Skip to content

Commit 84a941d

Browse files
committed
Update tests
1 parent 2002980 commit 84a941d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/out/refcount/initializer_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::os::fd::AsFd;
88
use std::rc::{Rc, Weak};
99
pub fn f_0(bytes: Vec<i32>) -> u64 {
1010
let bytes: Value<Vec<i32>> = Rc::new(RefCell::new(bytes));
11-
let buf: Value<Ptr<Vec<i32>>> = Rc::new(RefCell::new(Ptr::alloc((*bytes.borrow()))));
11+
let buf: Value<Ptr<Vec<i32>>> = Rc::new(RefCell::new(Ptr::alloc((*bytes.borrow()).clone())));
1212
let n: Value<u64> = Rc::new(RefCell::new((*bytes.borrow()).len() as u64));
1313
(*buf.borrow()).delete();
1414
return (*n.borrow());

tests/unit/out/unsafe/initializer_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::io::{Read, Seek, Write};
77
use std::os::fd::{AsFd, FromRawFd, IntoRawFd};
88
use std::rc::Rc;
99
pub unsafe fn f_0(mut bytes: Vec<i32>) -> u64 {
10-
let mut buf: *mut Vec<i32> = (Box::leak(Box::new(bytes)) as *mut Vec<i32>);
10+
let mut buf: *mut Vec<i32> = (Box::leak(Box::new(bytes.clone())) as *mut Vec<i32>);
1111
let mut n: u64 = bytes.len() as u64;
1212
::std::mem::drop(Box::from_raw(buf));
1313
return n;

0 commit comments

Comments
 (0)