Skip to content

Commit 5558ebb

Browse files
committed
libcore: Fix level-of-indirection problem in str::buf_as_slice
1 parent e0f5f25 commit 5558ebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ mod raw {
21012101

21022102
/// Form a slice from a *u8 buffer of the given length without copying.
21032103
unsafe fn buf_as_slice<T>(buf: *u8, len: uint, f: fn(&& &str) -> T) -> T {
2104-
let v = (*buf, len + 1);
2104+
let v = (buf, len + 1);
21052105
assert is_utf8(::cast::reinterpret_cast(&v));
21062106
f(::cast::transmute(move v))
21072107
}

0 commit comments

Comments
 (0)