mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-09 03:43:22 +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> {
|
||||
fn into(self) -> Result<R, RequestError> {
|
||||
match self {
|
||||
impl<R> From<TelegramResponse<R>> for ResponseResult<R> {
|
||||
fn from(this: TelegramResponse<R>) -> ResponseResult<R> {
|
||||
match this {
|
||||
TelegramResponse::Ok { response, .. } => Ok(response),
|
||||
TelegramResponse::Err {
|
||||
error,
|
||||
|
|
Loading…
Reference in a new issue