mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Add to_base62 method
This commit is contained in:
parent
a7334b6c23
commit
cbc4ee7554
2 changed files with 7 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
use byteorder::{BigEndian, ByteOrder};
|
||||
use extprim::u128::u128;
|
||||
use std;
|
||||
use std::fmt;
|
||||
use extprim::u128::u128;
|
||||
// Unneeded since 1.21
|
||||
#[allow(unused_imports)]
|
||||
use std::ascii::AsciiExt;
|
||||
|
@ -76,7 +76,7 @@ impl SpotifyId {
|
|||
let mut data = [0u8; 22];
|
||||
let sixty_two = u128::new(62);
|
||||
for i in 0..22 {
|
||||
data[21-i] = BASE62_DIGITS[(n % sixty_two).low64() as usize];
|
||||
data[21 - i] = BASE62_DIGITS[(n % sixty_two).low64() as usize];
|
||||
n /= sixty_two;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue