Changed an argument to a reference

This commit is contained in:
daladim 2021-03-21 19:27:55 +01:00
parent f29aca941b
commit bb2122db6b
5 changed files with 8 additions and 8 deletions

View file

@ -220,11 +220,11 @@ impl CalDavSource<RemoteCalendar> for Client {
}
async fn get_calendar(&self, id: CalendarId) -> Option<Arc<Mutex<RemoteCalendar>>> {
async fn get_calendar(&self, id: &CalendarId) -> Option<Arc<Mutex<RemoteCalendar>>> {
self.cached_replies.lock().unwrap()
.calendars
.as_ref()
.and_then(|cals| cals.get(&id))
.and_then(|cals| cals.get(id))
.map(|cal| cal.clone())
}
}