Fix warnings in cef.

This commit is contained in:
Ms2ger 2015-02-13 14:57:11 +01:00
parent efbbe22630
commit 7f47b8b8e2
6 changed files with 39 additions and 29 deletions

View file

@ -21,7 +21,7 @@ pub trait Downcast<Class> {
pub fn slice_to_str<F>(s: *const u8, l: uint, f: F) -> c_int where F: FnOnce(&str) -> c_int {
unsafe {
let s = slice::from_raw_buf(&s, l);
let s = slice::from_raw_parts(s, l);
str::from_utf8(s).map(f).unwrap_or(0)
}
}