Use u64 instead of i64 for user_id in html::user_mention and markdown::user_mention

This commit is contained in:
fr0staman 2023-07-09 15:00:04 +03:00
parent 5993a9cb6f
commit e3e89a1691
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ pub fn link(url: &str, text: &str) -> String {
/// 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 \
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)
}

View file

@ -71,7 +71,7 @@ pub fn link(url: &str, text: &str) -> String {
/// 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 \
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)
}