mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 11:43:57 +01:00
fix clippy: impl From instead of Into
This commit is contained in:
parent
71d90002ce
commit
56d546215a
1 changed files with 3 additions and 3 deletions
|
@ -29,9 +29,9 @@ pub(crate) enum TelegramResponse<R> {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R> Into<ResponseResult<R>> for TelegramResponse<R> {
|
impl<R> From<TelegramResponse<R>> for ResponseResult<R> {
|
||||||
fn into(self) -> Result<R, RequestError> {
|
fn from(this: TelegramResponse<R>) -> ResponseResult<R> {
|
||||||
match self {
|
match this {
|
||||||
TelegramResponse::Ok { response, .. } => Ok(response),
|
TelegramResponse::Ok { response, .. } => Ok(response),
|
||||||
TelegramResponse::Err {
|
TelegramResponse::Err {
|
||||||
error,
|
error,
|
||||||
|
|
Loading…
Reference in a new issue