fix clippy: impl From instead of Into

This commit is contained in:
Waffle 2021-01-07 16:01:46 +03:00
parent 71d90002ce
commit 56d546215a

View file

@ -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,