mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
refactoring
This commit is contained in:
parent
70e29b4edf
commit
eeddf3d54f
1 changed files with 3 additions and 3 deletions
|
@ -82,12 +82,12 @@ impl<'a> Request<'a> for SendAudio<'a> {
|
||||||
InputFile::Url(url) => params.add("audio", &url),
|
InputFile::Url(url) => params.add("audio", &url),
|
||||||
InputFile::FileId(file_id) => params.add("audio", &file_id),
|
InputFile::FileId(file_id) => params.add("audio", &file_id),
|
||||||
};
|
};
|
||||||
if self.thumb.is_some() {
|
if let Some(thumb) = self.thumb {
|
||||||
params = match self.thumb.unwrap() {
|
params = match thumb {
|
||||||
InputFile::File(file) => params.add_file("thumb", &file),
|
InputFile::File(file) => params.add_file("thumb", &file),
|
||||||
InputFile::Url(url) => params.add("thumb", &url),
|
InputFile::Url(url) => params.add("thumb", &url),
|
||||||
InputFile::FileId(file_id) => params.add("thumb", &file_id),
|
InputFile::FileId(file_id) => params.add("thumb", &file_id),
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
let params = params.build();
|
let params = params.build();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue