From f709dfd43a9031604646a4c96291388c43e36b8a Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Wed, 14 Sep 2022 22:05:01 +0800 Subject: Fix typos Found via `codespell -L crate`. --- src/archive.rs | 2 +- src/args.rs | 2 +- src/listing.rs | 4 ++-- src/main.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/archive.rs b/src/archive.rs index 29f60c1..940d4b6 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -250,7 +250,7 @@ where continue; } let current_entry_name = entry_path.file_name().ok_or_else(|| { - ContextualError::InvalidPathError("Invalid file or direcotory name".to_string()) + ContextualError::InvalidPathError("Invalid file or directory name".to_string()) })?; if entry_metadata.is_file() { let mut f = File::open(&entry_path) diff --git a/src/args.rs b/src/args.rs index a769256..a8718bd 100644 --- a/src/args.rs +++ b/src/args.rs @@ -203,7 +203,7 @@ pub struct CliArgs { pub readme: bool, } -/// Checks wether an interface is valid, i.e. it can be parsed into an IP address +/// Checks whether an interface is valid, i.e. it can be parsed into an IP address fn parse_interface(src: &str) -> Result { src.parse::() } diff --git a/src/listing.rs b/src/listing.rs index 82b4cdb..851f4ac 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -121,12 +121,12 @@ impl Entry { } } - /// Returns wether the entry is a directory + /// Returns whether the entry is a directory pub fn is_dir(&self) -> bool { self.entry_type == EntryType::Directory } - /// Returns wether the entry is a file + /// Returns whether the entry is a file pub fn is_file(&self) -> bool { self.entry_type == EntryType::File } diff --git a/src/main.rs b/src/main.rs index b46262d..9348a34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -299,7 +299,7 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) { if conf.spa { files = files.default_handler( NamedFile::open(&conf.path.join(index_file)) - .expect("Cant open SPA index file."), + .expect("Can't open SPA index file."), ); } } -- cgit v1.2.3