Skip to content

Commit

Permalink
Fix User::tag and CurrentUser::tag discrim output
Browse files Browse the repository at this point in the history
The output in a tag may result in "username#304" instead of the correct
"username#0304".
  • Loading branch information
Zeyla Hellyer committed Sep 28, 2017
1 parent 86d8bdd commit 6b9dcf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 6b9dcf5

Please sign in to comment.