mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Fix clippy warnings and make them all errors
This commit is contained in:
parent
161c38807d
commit
8989b0d2e3
12 changed files with 24 additions and 23 deletions
|
@ -1,3 +1,4 @@
|
|||
#![deny(clippy::all)]
|
||||
/*!
|
||||
|
||||
This crate implements the core of TaskChampion, the [replica](crate::Replica).
|
||||
|
|
|
@ -215,8 +215,8 @@ impl Task {
|
|||
/// Iterate over the task's tags
|
||||
pub fn get_tags(&self) -> impl Iterator<Item = Tag> + '_ {
|
||||
self.taskmap.iter().filter_map(|(k, _)| {
|
||||
if k.starts_with("tag.") {
|
||||
if let Ok(tag) = (&k[4..]).try_into() {
|
||||
if let Some(tag) = k.strip_prefix("tag.") {
|
||||
if let Ok(tag) = tag.try_into() {
|
||||
return Some(tag);
|
||||
}
|
||||
// note that invalid "tag.*" are ignored
|
||||
|
@ -326,7 +326,7 @@ impl<'r> TaskMut<'r> {
|
|||
|
||||
if let Some(v) = value {
|
||||
trace!("task {}: set property {}={:?}", self.task.uuid, property, v);
|
||||
self.task.taskmap.insert(property.to_string(), v);
|
||||
self.task.taskmap.insert(property, v);
|
||||
} else {
|
||||
trace!("task {}: remove property {}", self.task.uuid, property);
|
||||
self.task.taskmap.remove(&property);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue