diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-15 23:35:12 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-12-15 23:37:41 +1100 |
| commit | 164f7a290ef98377e4c8c158eca2fbed098a2842 (patch) | |
| tree | d9b2239b59f5d18bb680429595192fc64fdad6eb /src/libstd/str.rs | |
| parent | f53292f7ee7365fe50ac216efac438ff5569fd06 (diff) | |
| download | rust-164f7a290ef98377e4c8c158eca2fbed098a2842.tar.gz rust-164f7a290ef98377e4c8c158eca2fbed098a2842.zip | |
std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].
Diffstat (limited to 'src/libstd/str.rs')
| -rw-r--r-- | src/libstd/str.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 5a7f6f5dc3f..0c95f527ace 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1139,7 +1139,7 @@ pub mod raw { fn test_from_buf_len() { unsafe { let a = ~[65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 0u8]; - let b = vec::raw::to_ptr(a); + let b = a.as_ptr(); let c = from_buf_len(b, 3u); assert_eq!(c, ~"AAA"); } @@ -3360,7 +3360,7 @@ mod tests { fn test_raw_from_c_str() { unsafe { let a = ~[65, 65, 65, 65, 65, 65, 65, 0]; - let b = vec::raw::to_ptr(a); + let b = a.as_ptr(); let c = raw::from_c_str(b); assert_eq!(c, ~"AAAAAAA"); } |
