Skip to content

Commit

Permalink
Fix comment typos in stream-to-file example (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptrskay3 authored and davidpdrsn committed Oct 20, 2022
1 parent 04e0a9e commit ec428f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/stream-to-file/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async fn main() {
.with(tracing_subscriber::fmt::layer())
.init();

// save files to a separte directory to not override files in the current directory
// save files to a separate directory to not override files in the current directory
tokio::fs::create_dir(UPLOADS_DIRECTORY)
.await
.expect("failed to create `uploads` directory");
Expand Down Expand Up @@ -128,7 +128,7 @@ where
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))
}

// to prevent directory traversal attacks we ensure the path conists of exactly one normal
// to prevent directory traversal attacks we ensure the path consists of exactly one normal
// component
fn path_is_valid(path: &str) -> bool {
let path = std::path::Path::new(&*path);
Expand Down

0 comments on commit ec428f5

Please sign in to comment.