mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-23 20:16:41 +02:00
refactor: Use first to satisfy clippy
This commit is contained in:
parent
de552ee99c
commit
e8ca3e9cad
1 changed files with 7 additions and 7 deletions
14
src/app.rs
14
src/app.rs
|
@ -1304,7 +1304,7 @@ impl TaskwarriorTui {
|
|||
self.get_context()?;
|
||||
let task_uuids = self.selected_task_uuids();
|
||||
if self.current_selection_uuid.is_none() && self.current_selection_id.is_none() && task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -1798,7 +1798,7 @@ impl TaskwarriorTui {
|
|||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -1908,7 +1908,7 @@ impl TaskwarriorTui {
|
|||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -1961,7 +1961,7 @@ impl TaskwarriorTui {
|
|||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -2013,7 +2013,7 @@ impl TaskwarriorTui {
|
|||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -2100,7 +2100,7 @@ impl TaskwarriorTui {
|
|||
}
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
@ -2140,7 +2140,7 @@ impl TaskwarriorTui {
|
|||
}
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
if let Some(uuid) = task_uuids.first() {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue