mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
add cargo clippy to CI
This commit is contained in:
parent
2232aa8083
commit
ca70d2c914
12 changed files with 98 additions and 93 deletions
|
@ -1,3 +1,5 @@
|
|||
#![allow(clippy::new_without_default)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
type Blob = Vec<u8>;
|
||||
|
@ -32,10 +34,7 @@ impl User {
|
|||
if last_version == since_version as usize {
|
||||
return vec![];
|
||||
}
|
||||
self.versions[since_version as usize..last_version]
|
||||
.iter()
|
||||
.map(|r| r.clone())
|
||||
.collect::<Vec<Blob>>()
|
||||
self.versions[since_version as usize..last_version].to_vec()
|
||||
}
|
||||
|
||||
fn add_version(&mut self, version: u64, blob: Blob) -> VersionAdd {
|
||||
|
@ -72,7 +71,7 @@ impl Server {
|
|||
self.users
|
||||
.get(username)
|
||||
.map(|user| user.get_versions(since_version))
|
||||
.unwrap_or_else(|| vec![])
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Add a new version. If the given version number is incorrect, this responds with the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue