mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
fix clippy warnings
This commit is contained in:
parent
d832b0b859
commit
42d988d601
3 changed files with 4 additions and 6 deletions
|
@ -39,7 +39,7 @@ impl<'a> StorageTxn for InnerTxn<'a> {
|
|||
}
|
||||
|
||||
fn new_client(&mut self, client_id: Uuid, latest_version_id: Uuid) -> Fallible<()> {
|
||||
if let Some(_) = self.0.clients.get(&client_id) {
|
||||
if self.0.clients.get(&client_id).is_some() {
|
||||
return Err(format_err!("Client {} already exists", client_id));
|
||||
}
|
||||
self.0
|
||||
|
@ -54,7 +54,8 @@ impl<'a> StorageTxn for InnerTxn<'a> {
|
|||
latest_version_id: Uuid,
|
||||
) -> Fallible<()> {
|
||||
if let Some(client) = self.0.clients.get_mut(&client_id) {
|
||||
Ok(client.latest_version_id = latest_version_id)
|
||||
client.latest_version_id = latest_version_id;
|
||||
Ok(())
|
||||
} else {
|
||||
Err(format_err!("Client {} does not exist", client_id))
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::server::{AddVersionResult, GetVersionResult, HistorySegment, Server, VersionId};
|
||||
use failure::{format_err, Fallible};
|
||||
use std::io::Read;
|
||||
use ureq;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct RemoteServer {
|
||||
|
|
|
@ -151,9 +151,7 @@ impl Task {
|
|||
pub fn is_active(&self) -> bool {
|
||||
self.taskmap
|
||||
.iter()
|
||||
.filter(|(k, v)| k.starts_with("start.") && v.is_empty())
|
||||
.next()
|
||||
.is_some()
|
||||
.any(|(k, v)| k.starts_with("start.") && v.is_empty())
|
||||
}
|
||||
|
||||
pub fn get_modified(&self) -> Option<DateTime<Utc>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue