mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Remove usage of String::from_str, deprecated in #6377
This commit is contained in:
parent
24af4c4ec6
commit
5428226e04
6 changed files with 11 additions and 13 deletions
|
@ -40,10 +40,9 @@ pub extern "C" fn cef_string_map_append(sm: *mut cef_string_map_t, key: *const c
|
|||
if sm.is_null() { return 0; }
|
||||
let v = string_map_to_treemap(sm);
|
||||
slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
|
||||
let s = String::from_str(result);
|
||||
let csv = cef_string_userfree_utf16_alloc();
|
||||
cef_string_utf16_set((*value).str as *const u16, (*value).length, csv, 1);
|
||||
(*v).insert(s, csv);
|
||||
(*v).insert(result.to_owned(), csv);
|
||||
1
|
||||
})
|
||||
}
|
||||
|
@ -55,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; }
|
||||
let v = string_map_to_treemap(sm);
|
||||
slice_to_str((*key).str as *const u8, (*key).length as usize, |result| {
|
||||
match (*v).get(&String::from_str(result)) {
|
||||
match (*v).get(result) {
|
||||
Some(s) => {
|
||||
cef_string_utf16_set((**s).str as *const u16, (**s).length, value, 1);
|
||||
1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue