Skip to content

Commit 9eb8a48

Browse files
committed
fix: add Send marker to AsyncMavConnection for rust 1.70
1 parent 9d5d0fd commit 9eb8a48

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mavlink-core/src/async_connection/file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct AsyncFileConnection {
3636
}
3737

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

mavlink-core/src/async_connection/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::SigningConfig;
1515

1616
/// An async MAVLink connection
1717
#[async_trait::async_trait]
18-
pub trait AsyncMavConnection<M: Message + Sync> {
18+
pub trait AsyncMavConnection<M: Message + Sync + Send> {
1919
/// Receive a mavlink message.
2020
///
2121
/// Wait until a valid frame is received, ignoring invalid messages.

mavlink-core/src/async_connection/tcp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717

1818
/// TCP MAVLink connection
1919
20-
pub async fn select_protocol<M: Message + Sync>(
20+
pub async fn select_protocol<M: Message + Sync + Send>(
2121
address: &str,
2222
) -> io::Result<Box<dyn AsyncMavConnection<M> + Sync + Send>> {
2323
let connection = if let Some(address) = address.strip_prefix("tcpout:") {
@@ -97,7 +97,7 @@ struct TcpWrite {
9797
}
9898

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

0 commit comments

Comments
 (0)