aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports/cef/command_line.rs4
-rw-r--r--ports/cef/window.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/ports/cef/command_line.rs b/ports/cef/command_line.rs
index d4d4006d713..8ba04395423 100644
--- a/ports/cef/command_line.rs
+++ b/ports/cef/command_line.rs
@@ -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();
diff --git a/ports/cef/window.rs b/ports/cef/window.rs
index 330e9491cbb..948a3c13380 100644
--- a/ports/cef/window.rs
+++ b/ports/cef/window.rs
@@ -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)
}
}
}