aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-09-28 12:23:48 -0700
committerZeyla Hellyer <[email protected]>2017-09-28 12:23:48 -0700
commit6b9dcf5272458499c1caef544cb82d5a8624258b (patch)
tree879304b445f2a62e482580c5c9674114de9d9ec9 /src/model
parentFix client shards by cloning ShardManager runners (diff)
downloadserenity-6b9dcf5272458499c1caef544cb82d5a8624258b.tar.xz
serenity-6b9dcf5272458499c1caef544cb82d5a8624258b.zip
Fix User::tag and CurrentUser::tag discrim output
The output in a tag may result in "username#304" instead of the correct "username#0304".
Diffstat (limited to 'src/model')
-rw-r--r--src/model/user.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/user.rs b/src/model/user.rs
index bc22957..b28997f 100644
--- a/src/model/user.rs
+++ b/src/model/user.rs
@@ -800,7 +800,7 @@ fn tag(name: &str, discriminator: u16) -> String {
let mut tag = String::with_capacity(37);
tag.push_str(name);
tag.push('#');
- let _ = write!(tag, "{}", discriminator);
+ let _ = write!(tag, "{:04}", discriminator);
tag
}