Skip to content

Commit e480e19

Browse files
committed
Attempt to fix option::test_unwrap_str breakage.
1 parent 9c8ff35 commit e480e19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/option.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ fn test_unwrap_ptr() {
264264
#[test]
265265
fn test_unwrap_str() {
266266
let x = ~"test";
267-
let addr_x = str::as_buf(x, |buf, _len| ptr::p2::addr_of(&buf));
268-
let opt = Some(x);
269-
let y = unwrap(opt);
270-
let addr_y = str::as_buf(y, |buf, _len| ptr::p2::addr_of(&buf));
267+
let addr_x = str::as_buf(x, |buf, _len| buf);
268+
let opt = Some(move x);
269+
let y = unwrap(move opt);
270+
let addr_y = str::as_buf(y, |buf, _len| buf);
271271
assert addr_x == addr_y;
272272
}
273273

0 commit comments

Comments
 (0)