From e480e19694b234ba3eca20748947a4e47e805341 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 1 Oct 2012 16:06:28 -0700 Subject: [PATCH] Attempt to fix option::test_unwrap_str breakage. --- src/libcore/option.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 50cd0fdb5ba3..87d6aeefbc35 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -264,10 +264,10 @@ fn test_unwrap_ptr() { #[test] fn test_unwrap_str() { let x = ~"test"; - let addr_x = str::as_buf(x, |buf, _len| ptr::p2::addr_of(&buf)); - let opt = Some(x); - let y = unwrap(opt); - let addr_y = str::as_buf(y, |buf, _len| ptr::p2::addr_of(&buf)); + let addr_x = str::as_buf(x, |buf, _len| buf); + let opt = Some(move x); + let y = unwrap(move opt); + let addr_y = str::as_buf(y, |buf, _len| buf); assert addr_x == addr_y; }