Fix clippy warnings.
This commit is contained in:
committed by
Henrik Friedrichsen
parent
8222f1b2e4
commit
829b799cc5
@@ -35,15 +35,21 @@ pub struct WebApi {
|
||||
token_expiration: Arc<RwLock<DateTime<Utc>>>,
|
||||
}
|
||||
|
||||
impl WebApi {
|
||||
pub fn new() -> WebApi {
|
||||
WebApi {
|
||||
impl Default for WebApi {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
api: AuthCodeSpotify::default(),
|
||||
user: None,
|
||||
worker_channel: Arc::new(RwLock::new(None)),
|
||||
token_expiration: Arc::new(RwLock::new(Utc::now())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl WebApi {
|
||||
pub fn new() -> WebApi {
|
||||
Self::default()
|
||||
}
|
||||
|
||||
pub fn set_user(&mut self, user: Option<String>) {
|
||||
self.user = user;
|
||||
|
||||
@@ -342,7 +342,7 @@ impl View for Layout {
|
||||
}
|
||||
}
|
||||
|
||||
fn call_on_any<'a>(&mut self, s: &Selector, c: AnyCb<'a>) {
|
||||
fn call_on_any(&mut self, s: &Selector, c: AnyCb<'_>) {
|
||||
if let Some(view) = self.get_current_view_mut() {
|
||||
view.call_on_any(s, c);
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ impl View for SearchView {
|
||||
}
|
||||
}
|
||||
|
||||
fn call_on_any<'a>(&mut self, selector: &Selector<'_>, callback: AnyCb<'a>) {
|
||||
fn call_on_any(&mut self, selector: &Selector<'_>, callback: AnyCb<'_>) {
|
||||
self.edit.call_on_any(selector, &mut |v| callback(v));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user