embedding: replace usage of deprecated find*() with get*()

This commit is contained in:
Mike Blumenkrantz 2014-11-13 15:35:55 -05:00
parent 8b231a26e4
commit 8a4d2949e8
2 changed files with 4 additions and 4 deletions

View file

@ -54,7 +54,7 @@ pub extern "C" fn cef_string_map_find(sm: *mut cef_string_map_t, key: *const cef
if sm.is_null() { return 0; } if sm.is_null() { return 0; }
let v = string_map_to_treemap(sm); let v = string_map_to_treemap(sm);
slice_to_str((*key).str as *const u8, (*key).length as uint, |result| { slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
match (*v).find(&String::from_str(result)) { match (*v).get(&String::from_str(result)) {
Some(s) => { Some(s) => {
cef_string_utf8_set((**s).str as *const u8, (**s).length, value, 1); cef_string_utf8_set((**s).str as *const u8, (**s).length, value, 1);
1 1

View file

@ -43,7 +43,7 @@ pub extern "C" fn cef_string_multimap_find_count(smm: *mut cef_string_multimap_t
if smm.is_null() { return 0; } if smm.is_null() { return 0; }
let v = string_multimap_to_treemap(smm); let v = string_multimap_to_treemap(smm);
slice_to_str((*key).str as *const u8, (*key).length as uint, |result| { slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
match (*v).find(&String::from_str(result)) { match (*v).get(&String::from_str(result)) {
Some(s) => { Some(s) => {
s.len() as c_int s.len() as c_int
} }
@ -62,7 +62,7 @@ pub extern "C" fn cef_string_multimap_append(smm: *mut cef_string_multimap_t, ke
let s = String::from_str(result); let s = String::from_str(result);
let csv = cef_string_userfree_utf8_alloc(); let csv = cef_string_userfree_utf8_alloc();
cef_string_utf8_set((*value).str as *const u8, (*value).length, csv, 1); cef_string_utf8_set((*value).str as *const u8, (*value).length, csv, 1);
match (*v).find_mut(&s) { match (*v).get_mut(&s) {
Some(vc) => { Some(vc) => {
(*vc).push(csv); (*vc).push(csv);
1 1
@ -83,7 +83,7 @@ pub extern "C" fn cef_string_multimap_enumerate(smm: *mut cef_string_multimap_t,
if smm.is_null() { return 0; } if smm.is_null() { return 0; }
let v = string_multimap_to_treemap(smm); let v = string_multimap_to_treemap(smm);
slice_to_str((*key).str as *const u8, (*key).length as uint, |result| { slice_to_str((*key).str as *const u8, (*key).length as uint, |result| {
match (*v).find(&String::from_str(result)) { match (*v).get(&String::from_str(result)) {
Some(s) => { Some(s) => {
if (*s).len() <= index as uint { if (*s).len() <= index as uint {
return 0; return 0;