Replace uses of for foo in bar.iter(),

and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
This commit is contained in:
João Oliveira 2015-08-18 01:36:04 +01:00
parent f4b526cfb4
commit 067a22a868
32 changed files with 76 additions and 78 deletions

View file

@ -227,7 +227,7 @@ pub fn get_null_window_handle() -> cef_window_handle_t {
pub fn update() {
BROWSERS.with(|browsers| {
for browser in browsers.borrow().iter() {
for browser in &browsers.borrow() {
if browser.downcast().callback_executed.get() == false {
browser_callback_after_created(browser.clone());
}

View file

@ -59,7 +59,7 @@ pub extern "C" fn command_line_get_switch_value(cmd: *mut cef_command_line_t, na
let slice = slice::from_raw_parts(buf, (*cs).length as usize);
let opt = String::from_utf16(slice).unwrap();
//debug!("opt: {}", opt);
for s in (*cl).argv.iter() {
for s in &(*cl).argv {
let o = s.trim_left_matches('-');
//debug!("arg: {}", o);
if o.starts_with(&opt) {
@ -104,4 +104,3 @@ cef_stub_static_method_impls! {
fn cef_command_line_create_command_line() -> *mut cef_command_line_t
fn cef_command_line_get_global_command_line() -> *mut cef_command_line_t
}

View file

@ -82,7 +82,7 @@ pub extern "C" fn cef_string_multimap_key(smm: *mut cef_string_multimap_t, index
if index < 0 || smm.is_null() { return 0; }
let mut rem = index as usize;
for (key, val) in (*smm).iter() {
for (key, val) in &(*smm) {
if rem < (*val).len() {
return cef_string_utf16_set((*key).as_bytes().as_ptr() as *const u16,
(*key).len() as u64,