Impl Send + Sync for idevice

This commit is contained in:
Jackson Coxson
2025-01-09 18:30:17 -08:00
parent f4b52c69d6
commit 1c22b1ed59

View File

@@ -10,8 +10,8 @@ use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
use std::io::{self, BufWriter, Read, Write}; use std::io::{self, BufWriter, Read, Write};
use thiserror::Error; use thiserror::Error;
pub trait ReadWrite: Read + Write + std::fmt::Debug {} pub trait ReadWrite: Read + Write + Send + Sync + std::fmt::Debug {}
impl<T: Read + Write + std::fmt::Debug> ReadWrite for T {} impl<T: Read + Write + Send + Sync + std::fmt::Debug> ReadWrite for T {}
pub struct Idevice { pub struct Idevice {
socket: Option<Box<dyn ReadWrite>>, // in a box for now to use the ReadWrite trait for further uses socket: Option<Box<dyn ReadWrite>>, // in a box for now to use the ReadWrite trait for further uses