summaryrefslogtreecommitdiff
path: root/rust/src/downloadprovider.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-04-06 16:32:00 -0300
committerKyle Martin <krm504@nyu.edu>2024-04-09 13:39:49 -0400
commit193dea95daedde471e6f1fbcbeaf1932c6fbd50c (patch)
tree99be67d81a899543ed5e4636eea3d589583e48a5 /rust/src/downloadprovider.rs
parenta6b48153b64a227c3492d77a96e679b8c469034c (diff)
replace BStr with str
Diffstat (limited to 'rust/src/downloadprovider.rs')
-rw-r--r--rust/src/downloadprovider.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/downloadprovider.rs b/rust/src/downloadprovider.rs
index 4ba07dbe..97ebbdbc 100644
--- a/rust/src/downloadprovider.rs
+++ b/rust/src/downloadprovider.rs
@@ -2,10 +2,10 @@ use crate::rc::{
Array, CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Ref, RefCountable,
};
use crate::settings::Settings;
-use crate::string::{BnStr, BnStrCompatible, BnString};
+use crate::string::{BnStrCompatible, BnString};
use binaryninjacore_sys::*;
use std::collections::HashMap;
-use std::ffi::c_void;
+use std::ffi::{c_void, CStr};
use std::os::raw::c_char;
use std::ptr::null_mut;
use std::slice;
@@ -270,8 +270,8 @@ impl DownloadInstance {
.zip(response_header_values.iter())
{
response_headers.insert(
- BnStr::from_raw(*key).to_string(),
- BnStr::from_raw(*value).to_string(),
+ CStr::from_ptr(*key).to_str().unwrap().to_owned(),
+ CStr::from_ptr(*value).to_str().unwrap().to_owned(),
);
}
}