Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(types): simplify conversion from Article to InlineResult #306

Merged

Conversation

AndrielFR
Copy link
Contributor

Fixes:

1. the trait bound `grammers_client::grammers_tl_types::enums::InputBotInlineResult: From<grammers_client::types::inline::query::Article>` is not satisfied
   the following other types implement trait `From<T>`:
     `grammers_client::grammers_tl_types::enums::InputBotInlineResult` implements `From<InputBotInlineResultDocument>`
     `grammers_client::grammers_tl_types::enums::InputBotInlineResult` implements `From<InputBotInlineResultGame>`
     `grammers_client::grammers_tl_types::enums::InputBotInlineResult` implements `From<InputBotInlineResultPhoto>`
     `grammers_client::grammers_tl_types::enums::InputBotInlineResult` implements `From<grammers_client::grammers_tl_types::types::InputBotInlineResult>`
     `grammers_client::grammers_tl_types::enums::InputBotInlineResult` implements `From<grammers_client::types::inline::query::InlineResult>`
   required for `grammers_client::types::inline::query::Article` to implement `Into<grammers_client::grammers_tl_types::enums::InputBotInlineResult>` [E0277]

Refactored the conversion from Article to InlineResult by introducing a new From<Article> implementation for tl::enums::InputBotInlineResult. This simplifies the conversion logic and improves code readability.
@Lonami Lonami merged commit ca27bda into Lonami:master Jan 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants