servo: Merge #5662 - Remove some as_slice calls in cef (from Ms2ger:cef-core); r=larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: d16b102416128015a2a3296af69ed75195f3bd05
This commit is contained in:
Ms2ger 2015-04-13 08:45:22 -05:00
Родитель 1eb3ed2549
Коммит e9817abe10
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -61,9 +61,9 @@ pub extern "C" fn command_line_get_switch_value(cmd: *mut cef_command_line_t, na
let opt = String::from_utf16(slice).unwrap();
//debug!("opt: {}", opt);
for s in (*cl).argv.iter() {
let o = s.as_slice().trim_left_matches('-');
let o = s.trim_left_matches('-');
//debug!("arg: {}", o);
if o.as_slice().starts_with(opt.as_slice()) {
if o.starts_with(&opt) {
let mut string = mem::uninitialized();
let arg = o[opt.len() + 1..].as_bytes();
let c_str = ffi::CString::new(arg).unwrap();

Просмотреть файл

@ -279,7 +279,7 @@ impl WindowMethods for Window {
None => visitor.visit(&[]),
Some(string) => {
let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
visitor.visit(utf16_chars.as_slice())
visitor.visit(&utf16_chars)
}
}
}