Skip to content

Commit

Permalink
fix: small typos and lints (#24)
Browse files Browse the repository at this point in the history
* small typos

* make linter happy

---------

Co-authored-by: Jonathan Davidson <jonathan.davidson@canterbury.ac.nz>
  • Loading branch information
jrjdavidson and jrjdavidson authored May 29, 2024
1 parent eec4b8d commit 1cdcc30
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/directip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! Iridium `DirectIP` is a service provided by the Iridium company. New Mobile
//! Originated messages are forwarded from the Iridium servers to a configured
//! IP address. The Iridum service attempts to initate a TCP connection to port
//! IP address. The Iridium service attempts to initiate a TCP connection to port
//! 10800 at the specified IP. If the connection is successful, the MO message
//! is transmitted, then the connection is closed.
//!
Expand Down Expand Up @@ -132,7 +132,7 @@ fn handle_stream(stream: TcpStream, storage: Arc<Mutex<dyn Storage>>) {
let message = match Message::read_from(stream) {
Ok(message) => {
info!(
"Recieved message from IMEI {} with MOMN {} and {} byte payload",
"Received message from IMEI {} with MOMN {} and {} byte payload",
message.imei(),
message.momsn(),
message.payload().len(),
Expand Down
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ impl<P: AsRef<Path> + Send + Sync> log::Log for Logger<P> {
Box::new(
std::fs::OpenOptions::new()
.create(true)
.write(true)
.append(true)
.open(&self.path)
.unwrap(),
Expand Down Expand Up @@ -125,7 +124,7 @@ fn main() {
Ok(ref message) => match str::from_utf8(message.payload()) {
Ok(content) => println!("{}", content),
Err(err) => {
println!("ERROR: Unable to parse paylode as UTF-8: {}", err);
println!("ERROR: Unable to parse payload as UTF-8: {}", err);
process::exit(1);
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/mo/session_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum SessionStatus {
OkLocationUnacceptableQuality = 2,
/// The SBD session timed out before session completion.
Timeout = 10,
/// The MO message being transferred by the IMEI is too large to be transerred within a single
/// The MO message being transferred by the IMEI is too large to be transferred within a single
/// SBD session.
MobileOriginatedTooLarge = 12,
/// An RF link loss ocurred during the SBD session.
Expand Down
2 changes: 1 addition & 1 deletion src/storage/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{mo::Message, storage, Error};

const SBD_EXTENSION: &str = "sbd";

/// A structure for managing storing and retriving SBD messages on a filesystem.
/// A structure for managing storing and retrieving SBD messages on a filesystem.
///
/// Messages are stored in a directory hierarchy under a single root directory.
/// Message storage and retrieval are managed by a `Storage` object, which is
Expand Down

0 comments on commit 1cdcc30

Please sign in to comment.