core: Rename str::from_cstr et. al to from_buf
This commit is contained in:
@@ -66,7 +66,7 @@ fn fill_charp_buf(f: fn(*mutable c_char, size_t) -> bool)
|
||||
let buf = vec::to_mut(vec::from_elem(tmpbuf_sz, 0u8 as c_char));
|
||||
vec::as_mut_buf(buf) { |b|
|
||||
if f(b, tmpbuf_sz as size_t) {
|
||||
some(str::from_cstr(b as *u8))
|
||||
some(str::from_buf(b as *u8))
|
||||
} else {
|
||||
none
|
||||
}
|
||||
@@ -125,7 +125,7 @@ fn getenv(n: str) -> option<str> unsafe {
|
||||
option::none::<str>
|
||||
} else {
|
||||
let s = unsafe::reinterpret_cast(s);
|
||||
option::some::<str>(str::from_cstr(s))
|
||||
option::some::<str>(str::from_buf(s))
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user