mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix warnings in cef.
This commit is contained in:
parent
efbbe22630
commit
7f47b8b8e2
6 changed files with 39 additions and 29 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue