libcore: Remove as_bytes_slice
This commit is contained in:
parent
68704e4ca7
commit
c2f8cf9dc1
@ -24,6 +24,7 @@ export
|
|||||||
|
|
||||||
// Reinterpretation
|
// Reinterpretation
|
||||||
as_bytes,
|
as_bytes,
|
||||||
|
as_bytes_slice,
|
||||||
as_buf,
|
as_buf,
|
||||||
as_c_str,
|
as_c_str,
|
||||||
|
|
||||||
@ -1751,6 +1752,10 @@ pure fn as_bytes<T>(s: ~str, f: fn(~[u8]) -> T) -> T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pure fn as_bytes_slice(s: &a/str) -> &a/[u8] {
|
||||||
|
unsafe { ::unsafe::reinterpret_cast(&s) }
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Work with the byte buffer of a string as a null-terminated C string.
|
* Work with the byte buffer of a string as a null-terminated C string.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user