Merge pull request #843 from beyarkay/patch-1

Add docstring to Message::from
This commit is contained in:
Sima Kinsart 2023-02-15 11:59:20 +00:00 committed by GitHub
commit 0688e1f6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -620,6 +620,7 @@ mod getters {
/// [Message]: crate::types::Message
/// [telegram docs]: https://core.telegram.org/bots/api#message
impl Message {
/// Returns the user who sent the message.
#[must_use]
pub fn from(&self) -> Option<&User> {
match &self.kind {