mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Use u64
instead of i64
for user_id
in html::user_mention
and markdown::user_mention
This commit is contained in:
parent
5993a9cb6f
commit
e3e89a1691
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ pub fn link(url: &str, text: &str) -> String {
|
||||||
/// Builds an inline user mention link with an anchor.
|
/// Builds an inline user mention link with an anchor.
|
||||||
#[must_use = "This function returns a new string, rather than mutating the argument, so calling it \
|
#[must_use = "This function returns a new string, rather than mutating the argument, so calling it \
|
||||||
without using its output does nothing useful"]
|
without using its output does nothing useful"]
|
||||||
pub fn user_mention(user_id: i64, text: &str) -> String {
|
pub fn user_mention(user_id: u64, text: &str) -> String {
|
||||||
link(format!("tg://user?id={user_id}").as_str(), text)
|
link(format!("tg://user?id={user_id}").as_str(), text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ pub fn link(url: &str, text: &str) -> String {
|
||||||
/// Builds an inline user mention link with an anchor.
|
/// Builds an inline user mention link with an anchor.
|
||||||
#[must_use = "This function returns a new string, rather than mutating the argument, so calling it \
|
#[must_use = "This function returns a new string, rather than mutating the argument, so calling it \
|
||||||
without using its output does nothing useful"]
|
without using its output does nothing useful"]
|
||||||
pub fn user_mention(user_id: i64, text: &str) -> String {
|
pub fn user_mention(user_id: u64, text: &str) -> String {
|
||||||
link(format!("tg://user?id={user_id}").as_str(), text)
|
link(format!("tg://user?id={user_id}").as_str(), text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue