aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2022-09-15 06:47:12 +0000
committerGitHub <noreply@github.com>2022-09-15 06:47:12 +0000
commit2648e6b1a579d0e0e5c36fea0b13fb74bc59c889 (patch)
treea2ca2595f95fbad4f4213f017391602affcc0b2d
parentBump deps (diff)
parentFix typos (diff)
downloadminiserve-2648e6b1a579d0e0e5c36fea0b13fb74bc59c889.tar.gz
miniserve-2648e6b1a579d0e0e5c36fea0b13fb74bc59c889.zip
Merge pull request #902 from kianmeng/fix-typos
Fix typos
-rw-r--r--src/archive.rs2
-rw-r--r--src/args.rs2
-rw-r--r--src/listing.rs4
-rw-r--r--src/main.rs2
-rw-r--r--tests/serve_request.rs4
5 files changed, 7 insertions, 7 deletions
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<IpAddr, std::net::AddrParseError> {
src.parse::<IpAddr>()
}
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 08cb19a..08c6680 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -298,7 +298,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."),
);
}
}
diff --git a/tests/serve_request.rs b/tests/serve_request.rs
index aa57a9b..f376469 100644
--- a/tests/serve_request.rs
+++ b/tests/serve_request.rs
@@ -138,7 +138,7 @@ fn serves_requests_symlinks(
let broken = "symlink broken";
// Set up some basic symlinks:
- // to dir, to file, to non-existant location
+ // to dir, to file, to non-existent location
let orig = DIRECTORIES[0].strip_suffix("/").unwrap();
let link = server.path().join(dir.strip_suffix("/").unwrap());
symlink_dir(orig, link).expect("Couldn't create symlink");
@@ -169,7 +169,7 @@ fn serves_requests_symlinks(
}
// If following symlinks is deactivated, we can just skip this iteration as we assorted
- // above tht no entries in the listing can be found for symlinks in that case.
+ // above the no entries in the listing can be found for symlinks in that case.
if no_symlinks {
continue;
}