From 0708ccf85bac347e59053133a2b8b6f2eabe99ba Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Thu, 15 Dec 2016 12:46:27 -0800 Subject: Fix User::avatar_url + add Id display tests User::avatar_url was formatting the user's Id as a mention, rather than the inner u64. --- src/model/user.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/model/user.rs b/src/model/user.rs index 9883bd1..af026ea 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -37,7 +37,7 @@ impl CurrentUser { /// Returns the formatted URL of the user's icon, if one exists. pub fn avatar_url(&self) -> Option { self.avatar.as_ref().map(|av| - format!(cdn!("/avatars/{}/{}.jpg"), self.id, av)) + format!(cdn!("/avatars/{}/{}.jpg"), self.id.0, av)) } /// Edits the current user's profile settings. @@ -101,7 +101,7 @@ impl User { /// Returns the formatted URL of the user's icon, if one exists. pub fn avatar_url(&self) -> Option { self.avatar.as_ref().map(|av| - format!(cdn!("/avatars/{}/{}.jpg"), self.id, av)) + format!(cdn!("/avatars/{}/{}.jpg"), self.id.0, av)) } /// Gets user as `Member` of a guild. -- cgit v1.2.3