Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Aug 25, 2024
1 parent dbff289 commit f4913a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mavlink-core/src/connection/direct_serial.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -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<SerialConnection> {
let settings_toks: Vec<&str> = settings.split(':').collect();
if settings_toks.len() < 2 {
Expand Down
4 changes: 2 additions & 2 deletions mavlink-core/src/connection/file.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! File MAVLINK connection

use crate::connection::MavConnection;
use crate::error::{MessageReadError, MessageWriteError};
use crate::peek_reader::PeekReader;
Expand All @@ -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<FileConnection> {
let file = File::open(file_path)?;

Expand Down
4 changes: 2 additions & 2 deletions mavlink-core/src/connection/tcp.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -10,8 +12,6 @@ use std::time::Duration;

use super::get_socket_addr;

/// TCP MAVLink connection

pub fn select_protocol<M: Message>(
address: &str,
) -> io::Result<Box<dyn MavConnection<M> + Sync + Send>> {
Expand Down
2 changes: 1 addition & 1 deletion mavlink-core/src/connection/udp.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! UDP MAVLink connection
//!

use std::collections::VecDeque;

use crate::connection::MavConnection;
Expand Down

0 comments on commit f4913a6

Please sign in to comment.