diff --git a/mavlink-core/src/connection/direct_serial.rs b/mavlink-core/src/connection/direct_serial.rs index 63262e35f6..a3a33a0fa6 100644 --- a/mavlink-core/src/connection/direct_serial.rs +++ b/mavlink-core/src/connection/direct_serial.rs @@ -1,3 +1,5 @@ +//! Serial MAVLINK connection + use crate::connection::MavConnection; use crate::peek_reader::PeekReader; use crate::{read_versioned_msg, write_versioned_msg, MavHeader, MavlinkVersion, Message}; @@ -8,8 +10,6 @@ use std::sync::Mutex; use crate::error::{MessageReadError, MessageWriteError}; use serial::{prelude::*, SystemPort}; -/// Serial MAVLINK connection - pub fn open(settings: &str) -> io::Result { let settings_toks: Vec<&str> = settings.split(':').collect(); if settings_toks.len() < 2 { diff --git a/mavlink-core/src/connection/file.rs b/mavlink-core/src/connection/file.rs index 12e6bebafa..85444bb6ae 100644 --- a/mavlink-core/src/connection/file.rs +++ b/mavlink-core/src/connection/file.rs @@ -1,3 +1,5 @@ +//! File MAVLINK connection + use crate::connection::MavConnection; use crate::error::{MessageReadError, MessageWriteError}; use crate::peek_reader::PeekReader; @@ -7,8 +9,6 @@ use std::fs::File; use std::io; use std::sync::Mutex; -/// File MAVLINK connection - pub fn open(file_path: &str) -> io::Result { let file = File::open(file_path)?; diff --git a/mavlink-core/src/connection/tcp.rs b/mavlink-core/src/connection/tcp.rs index 0629039fbf..35b7f09084 100644 --- a/mavlink-core/src/connection/tcp.rs +++ b/mavlink-core/src/connection/tcp.rs @@ -1,3 +1,5 @@ +//! TCP MAVLink connection + use crate::connection::MavConnection; use crate::peek_reader::PeekReader; use crate::{read_versioned_msg, write_versioned_msg, MavHeader, MavlinkVersion, Message}; @@ -10,8 +12,6 @@ use std::time::Duration; use super::get_socket_addr; -/// TCP MAVLink connection - pub fn select_protocol( address: &str, ) -> io::Result + Sync + Send>> { diff --git a/mavlink-core/src/connection/udp.rs b/mavlink-core/src/connection/udp.rs index 17926aea02..3ec739d3f5 100644 --- a/mavlink-core/src/connection/udp.rs +++ b/mavlink-core/src/connection/udp.rs @@ -1,5 +1,5 @@ //! UDP MAVLink connection -//! + use std::collections::VecDeque; use crate::connection::MavConnection;