Fix clippy's `warning: returning the result of a let binding from a block`
@@ -30,12 +30,11 @@ pub fn file_to_part(path_to_file: &PathBuf) -> Part {
)
})
.flatten_stream();
- let part = Part::stream(Body::wrap_stream(file)).file_name(
+ Part::stream(Body::wrap_stream(file)).file_name(
path_to_file
.file_name()
.unwrap()
.to_string_lossy()
.into_owned(),
- );
- part
+ )
}
