mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #5662 - Ms2ger:cef-core, r=larsbergstrom
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5662) <!-- Reviewable:end -->
This commit is contained in:
commit
d16b102416
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
let opt = String::from_utf16(slice).unwrap();
|
||||||
//debug!("opt: {}", opt);
|
//debug!("opt: {}", opt);
|
||||||
for s in (*cl).argv.iter() {
|
for s in (*cl).argv.iter() {
|
||||||
let o = s.as_slice().trim_left_matches('-');
|
let o = s.trim_left_matches('-');
|
||||||
//debug!("arg: {}", o);
|
//debug!("arg: {}", o);
|
||||||
if o.as_slice().starts_with(opt.as_slice()) {
|
if o.starts_with(&opt) {
|
||||||
let mut string = mem::uninitialized();
|
let mut string = mem::uninitialized();
|
||||||
let arg = o[opt.len() + 1..].as_bytes();
|
let arg = o[opt.len() + 1..].as_bytes();
|
||||||
let c_str = ffi::CString::new(arg).unwrap();
|
let c_str = ffi::CString::new(arg).unwrap();
|
||||||
|
|
|
@ -279,7 +279,7 @@ impl WindowMethods for Window {
|
||||||
None => visitor.visit(&[]),
|
None => visitor.visit(&[]),
|
||||||
Some(string) => {
|
Some(string) => {
|
||||||
let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
|
let utf16_chars: Vec<u16> = Utf16Encoder::new(string.chars()).collect();
|
||||||
visitor.visit(utf16_chars.as_slice())
|
visitor.visit(&utf16_chars)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue