Skip to content

Commit 91f8991

Browse files
committed
Fix Clippy lints
1 parent 6de4039 commit 91f8991

3 files changed

Lines changed: 6 additions & 19 deletions

File tree

crates/hyperqueue/src/dashboard/ui/fragments/auto_allocator/fragment.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ pub struct AutoAllocatorFragment {
2727
component_in_focus: FocusedComponent,
2828
}
2929

30+
#[derive(Default)]
3031
enum FocusedComponent {
32+
#[default]
3133
QueueParamsTable,
3234
AllocationInfoTable,
3335
}
@@ -166,9 +168,3 @@ impl AutoAllocFragmentLayout {
166168
}
167169
}
168170
}
169-
170-
impl Default for FocusedComponent {
171-
fn default() -> Self {
172-
FocusedComponent::QueueParamsTable
173-
}
174-
}

crates/hyperqueue/src/dashboard/ui/fragments/job/fragment.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ pub struct JobFragment {
3131
component_in_focus: FocusedComponent,
3232
}
3333

34+
#[derive(Default)]
3435
enum FocusedComponent {
36+
#[default]
3537
JobsTable,
3638
JobTasksTable,
3739
}
@@ -156,9 +158,3 @@ impl JobFragmentLayout {
156158
}
157159
}
158160
}
159-
160-
impl Default for FocusedComponent {
161-
fn default() -> Self {
162-
FocusedComponent::JobsTable
163-
}
164-
}

crates/tako/src/program.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ use bstr::BString;
33
use serde::{Deserialize, Serialize};
44
use std::path::PathBuf;
55

6-
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
6+
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq, Default)]
77
pub enum StdioDef {
8+
#[default]
89
Null,
910
File(PathBuf),
1011
Pipe,
@@ -23,12 +24,6 @@ impl StdioDef {
2324
}
2425
}
2526

26-
impl Default for StdioDef {
27-
fn default() -> Self {
28-
StdioDef::Null
29-
}
30-
}
31-
3227
#[derive(Serialize, Deserialize, Debug, Clone)]
3328
pub struct ProgramDefinition {
3429
pub args: Vec<BString>,

0 commit comments

Comments
 (0)