From a7243ff8ce4a3f0bc6eda6ca77592683da9612a4 Mon Sep 17 00:00:00 2001 From: Will Stott Date: Tue, 22 Oct 2019 18:31:18 +0100 Subject: [PATCH] Use single fixed-width format! macro for SpotifyId.to_base16 --- Cargo.lock | 3 +++ core/src/spotify_id.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index f8fd3f88..888ef466 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -492,7 +492,10 @@ name = "env_logger" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/core/src/spotify_id.rs b/core/src/spotify_id.rs index 841c3225..79414a18 100644 --- a/core/src/spotify_id.rs +++ b/core/src/spotify_id.rs @@ -55,7 +55,7 @@ impl SpotifyId { } pub fn to_base16(&self) -> String { - format!("{:0>32}", format!("{:x}", self.0)) + format!("{:032x}", self.0) } pub fn to_base62(&self) -> String {