mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Fix clippy's warning: returning the result of a let binding from a block
This commit is contained in:
parent
e087391534
commit
53b9ab31c4
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue