Skip to content

Commit

Permalink
fix: add Send marker to AsyncMavConnection for rust 1.70
Browse files Browse the repository at this point in the history
  • Loading branch information
pv42 committed Sep 7, 2024
1 parent 9d5d0fd commit 9eb8a48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mavlink-core/src/async_connection/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct AsyncFileConnection {
}

#[async_trait::async_trait]
impl<M: Message + Sync> AsyncMavConnection<M> for AsyncFileConnection {
impl<M: Message + Sync + Send> AsyncMavConnection<M> for AsyncFileConnection {
async fn recv(&self) -> Result<(MavHeader, M), crate::error::MessageReadError> {
let mut file = self.file.lock().await;

Expand Down
2 changes: 1 addition & 1 deletion mavlink-core/src/async_connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::SigningConfig;

/// An async MAVLink connection
#[async_trait::async_trait]
pub trait AsyncMavConnection<M: Message + Sync> {
pub trait AsyncMavConnection<M: Message + Sync + Send> {
/// Receive a mavlink message.
///
/// Wait until a valid frame is received, ignoring invalid messages.
Expand Down
4 changes: 2 additions & 2 deletions mavlink-core/src/async_connection/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{

/// TCP MAVLink connection

pub async fn select_protocol<M: Message + Sync>(
pub async fn select_protocol<M: Message + Sync + Send>(
address: &str,
) -> io::Result<Box<dyn AsyncMavConnection<M> + Sync + Send>> {
let connection = if let Some(address) = address.strip_prefix("tcpout:") {
Expand Down Expand Up @@ -97,7 +97,7 @@ struct TcpWrite {
}

#[async_trait::async_trait]
impl<M: Message + Sync> AsyncMavConnection<M> for TcpConnection {
impl<M: Message + Sync + Send> AsyncMavConnection<M> for TcpConnection {
async fn recv(&self) -> Result<(MavHeader, M), crate::error::MessageReadError> {
let mut reader = self.reader.lock().await;
#[cfg(not(feature = "signing"))]
Expand Down

0 comments on commit 9eb8a48

Please sign in to comment.