1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-06 03:50:06 +02:00

Issue 130 (#164)

* Core API: device_id

* Core API: u128
This commit is contained in:
Anton Voyl 2018-02-24 16:34:04 +01:00 committed by Paul Liétar
parent 685fb4e345
commit 58ea1baa98
4 changed files with 12 additions and 11 deletions

View file

@ -1,6 +1,4 @@
use bytes::Bytes;
use crypto::digest::Digest;
use crypto::sha1::Sha1;
use futures::{Async, Future, IntoFuture, Poll, Stream};
use futures::sync::mpsc;
use std::io;
@ -45,12 +43,6 @@ static SESSION_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
#[derive(Clone)]
pub struct Session(Arc<SessionInternal>);
pub fn device_id(name: &str) -> String {
let mut h = Sha1::new();
h.input_str(name);
h.result_str()
}
impl Session {
pub fn connect(
config: SessionConfig,