mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
embedding: replace usage of deprecated find*() with get*()
This commit is contained in:
parent
8b231a26e4
commit
8a4d2949e8
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue