From 193dea95daedde471e6f1fbcbeaf1932c6fbd50c Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Sat, 6 Apr 2024 16:32:00 -0300 Subject: replace BStr with str --- rust/src/downloadprovider.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/downloadprovider.rs') 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(), ); } } -- cgit v1.3.1