Update to librespot 0.2.0 and Tokio v1
This also brings some much need async/.await rewrites
This commit is contained in:
@@ -103,10 +103,8 @@ impl Queue {
|
||||
}
|
||||
|
||||
pub fn get_current(&self) -> Option<Playable> {
|
||||
match self.get_current_index() {
|
||||
Some(index) => Some(self.queue.read().unwrap()[index].clone()),
|
||||
None => None,
|
||||
}
|
||||
self.get_current_index()
|
||||
.map(|index| self.queue.read().unwrap()[index].clone())
|
||||
}
|
||||
|
||||
pub fn get_current_index(&self) -> Option<usize> {
|
||||
|
||||
Reference in New Issue
Block a user