lint
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
#![warn(
|
||||
clippy::all,
|
||||
clippy::pedantic,
|
||||
)]
|
||||
use anyhow::Result;
|
||||
use log::{error, info};
|
||||
use nautilus_common::add_ctrlc_handler;
|
||||
@@ -6,10 +10,14 @@ use nautilus_common::telemetry::Telemetry;
|
||||
use nautilus_common::udp::{UdpRecvCborError, UdpSocketExt};
|
||||
use std::io::Cursor;
|
||||
use std::net::{IpAddr, Ipv4Addr, SocketAddr, UdpSocket};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::time::Duration;
|
||||
|
||||
/// Run the Ground Software
|
||||
///
|
||||
/// # Errors
|
||||
/// If any unhandled error occurred in the Ground Software
|
||||
pub fn run() -> Result<()> {
|
||||
info!(
|
||||
"Project Nautilus Ground Software {}",
|
||||
@@ -43,8 +51,8 @@ pub fn run() -> Result<()> {
|
||||
|
||||
if let Some(flight_addr) = flight_addr {
|
||||
let cmd = Command::Shutdown;
|
||||
udp.send_cbor(&cmd, &mut buffer, &flight_addr)?;
|
||||
udp.send_cbor(&cmd, &mut buffer, flight_addr)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,11 @@ fn main() {
|
||||
match run() {
|
||||
Ok(_) => {}
|
||||
Err(err) => {
|
||||
error!("An unhandled error occurred: {}\n\n{}", err, err.backtrace());
|
||||
error!(
|
||||
"An unhandled error occurred: {}\n\n{}",
|
||||
err,
|
||||
err.backtrace()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user