diff --git a/examples/send_file.rs b/examples/send_file.rs
index 821e773d..ec8bbc6b 100644
--- a/examples/send_file.rs
+++ b/examples/send_file.rs
@@ -61,13 +61,11 @@ fn internal_server_error() -> Response
{
.unwrap()
}
-async fn simple_file_send(f: &str) -> Result> {
+async fn simple_file_send(filename: &str) -> Result> {
// Serve a file by asynchronously reading it entirely into memory.
// Uses tokio_fs to open file asynchronously, then tokio::io::AsyncReadExt
// to read into memory asynchronously.
- let filename = f.to_string(); // we need to copy for lifetime issues
-
if let Ok(mut file) = File::open(filename).await {
let mut buf = Vec::new();
if let Ok(_) = file.read_to_end(&mut buf).await {