summaryrefslogtreecommitdiff
path: root/rust/src/websocket
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/websocket')
-rw-r--r--rust/src/websocket/client.rs10
-rw-r--r--rust/src/websocket/provider.rs4
2 files changed, 7 insertions, 7 deletions
diff --git a/rust/src/websocket/client.rs b/rust/src/websocket/client.rs
index 8e2c6db0..aa69c381 100644
--- a/rust/src/websocket/client.rs
+++ b/rust/src/websocket/client.rs
@@ -1,5 +1,5 @@
use crate::rc::{Ref, RefCountable};
-use crate::string::{AsCStr, BnString};
+use crate::string::{BnString, IntoCStr};
use binaryninjacore_sys::*;
use std::ffi::{c_char, c_void, CStr};
use std::ptr::NonNull;
@@ -21,8 +21,8 @@ pub trait WebsocketClient: Sync + Send {
fn connect<I, K, V>(&self, host: &str, headers: I) -> bool
where
I: IntoIterator<Item = (K, V)>,
- K: AsCStr,
- V: AsCStr;
+ K: IntoCStr,
+ V: IntoCStr;
fn write(&self, data: &[u8]) -> bool;
@@ -77,8 +77,8 @@ impl CoreWebsocketClient {
) -> bool
where
I: IntoIterator<Item = (K, V)>,
- K: AsCStr,
- V: AsCStr,
+ K: IntoCStr,
+ V: IntoCStr,
C: WebsocketClientCallback,
{
let url = host.to_cstr();
diff --git a/rust/src/websocket/provider.rs b/rust/src/websocket/provider.rs
index 9cc1de84..40235c2b 100644
--- a/rust/src/websocket/provider.rs
+++ b/rust/src/websocket/provider.rs
@@ -1,5 +1,5 @@
use crate::rc::{Array, CoreArrayProvider, CoreArrayProviderInner, Ref};
-use crate::string::{AsCStr, BnString};
+use crate::string::{BnString, IntoCStr};
use crate::websocket::client;
use crate::websocket::client::{CoreWebsocketClient, WebsocketClient};
use binaryninjacore_sys::*;
@@ -80,7 +80,7 @@ impl CoreWebsocketProvider {
unsafe { Array::new(result, count, ()) }
}
- pub fn by_name<S: AsCStr>(name: S) -> Option<CoreWebsocketProvider> {
+ pub fn by_name<S: IntoCStr>(name: S) -> Option<CoreWebsocketProvider> {
let name = name.to_cstr();
let result = unsafe { BNGetWebsocketProviderByName(name.as_ptr()) };
NonNull::new(result).map(|h| unsafe { Self::from_raw(h) })