diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-02-19 05:08:02 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-02-19 05:08:02 +0000 |
commit | dc92b4e4107885b8a891ce3406e0fca236ccb2d5 (patch) | |
tree | 9be317f18894d11c2954bc344c591be8e89454aa /src/main.rs | |
parent | Merge pull request #444 from svenstaro/dependabot/cargo/chrono-humanize-0.1.2 (diff) | |
download | miniserve-dc92b4e4107885b8a891ce3406e0fca236ccb2d5.tar.gz miniserve-dc92b4e4107885b8a891ce3406e0fca236ccb2d5.zip |
Fix lints
Diffstat (limited to '')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 136b986..c55e77f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,7 +127,7 @@ async fn run() -> Result<(), ContextualError> { .path .symlink_metadata() .map_err(|e| { - ContextualError::IOError("Failed to retrieve symlink's metadata".to_string(), e) + ContextualError::IoError("Failed to retrieve symlink's metadata".to_string(), e) })? .file_type() .is_symlink(); @@ -159,7 +159,7 @@ async fn run() -> Result<(), ContextualError> { .collect::<Vec<String>>(); let canon_path = miniserve_config.path.canonicalize().map_err(|e| { - ContextualError::IOError("Failed to resolve path to be served".to_string(), e) + ContextualError::IoError("Failed to resolve path to be served".to_string(), e) })?; if let Some(index_path) = &miniserve_config.index { @@ -186,12 +186,12 @@ async fn run() -> Result<(), ContextualError> { print!("Starting server in "); io::stdout() .flush() - .map_err(|e| ContextualError::IOError("Failed to write data".to_string(), e))?; + .map_err(|e| ContextualError::IoError("Failed to write data".to_string(), e))?; for c in "3… 2… 1… \n".chars() { print!("{}", c); io::stdout() .flush() - .map_err(|e| ContextualError::IOError("Failed to write data".to_string(), e))?; + .map_err(|e| ContextualError::IoError("Failed to write data".to_string(), e))?; thread::sleep(Duration::from_millis(500)); } } @@ -263,7 +263,7 @@ async fn run() -> Result<(), ContextualError> { .default_service(web::get().to(error_404)) }) .bind(socket_addresses.as_slice()) - .map_err(|e| ContextualError::IOError("Failed to bind server".to_string(), e))? + .map_err(|e| ContextualError::IoError("Failed to bind server".to_string(), e))? .shutdown_timeout(0) .run(); @@ -276,7 +276,7 @@ async fn run() -> Result<(), ContextualError> { println!("\nQuit by pressing CTRL-C"); srv.await - .map_err(|e| ContextualError::IOError("".to_owned(), e)) + .map_err(|e| ContextualError::IoError("".to_owned(), e)) } /// Configures the Actix application |