aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-04-13 08:45:22 -0500
committerbors-servo <metajack+bors@gmail.com>2015-04-13 08:45:22 -0500
commitd16b102416128015a2a3296af69ed75195f3bd05 (patch)
treeffd2ced05b32180c43341085900e7af5a1fa052d
parent1e45d025b381390f346e8f24db615cb698033844 (diff)
parent066cf8e706967ff4cef5f5cc98683b8e2ca437f7 (diff)
downloadservo-d16b102416128015a2a3296af69ed75195f3bd05.tar.gz
servo-d16b102416128015a2a3296af69ed75195f3bd05.zip
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 -->
-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)
}
}
}