cargo clippy
This commit is contained in:
@@ -15,7 +15,9 @@ use crate::action_raw::RawAction;
|
||||
#[derive(Clone, Copy, Debug, Deserialize_repr)]
|
||||
#[repr(u8)]
|
||||
#[derive(Eq, PartialEq)]
|
||||
#[derive(Default)]
|
||||
pub enum ActionType {
|
||||
#[default]
|
||||
Unknown = 0,
|
||||
CopyPath = 100,
|
||||
FileTransfer = 101,
|
||||
@@ -32,11 +34,6 @@ pub enum ActionType {
|
||||
FetchTree = 112,
|
||||
}
|
||||
|
||||
impl Default for ActionType {
|
||||
fn default() -> Self {
|
||||
Self::Unknown
|
||||
}
|
||||
}
|
||||
|
||||
// ---
|
||||
// --- BuildStepId
|
||||
|
||||
@@ -23,7 +23,7 @@ impl Handler for SubstituteHandler {
|
||||
) -> color_eyre::Result<bool> {
|
||||
match action {
|
||||
Action::Start {
|
||||
start_type: StartFields::Substitute { source, target },
|
||||
start_type: StartFields::Substitute { .. },
|
||||
id,
|
||||
..
|
||||
} => {
|
||||
|
||||
@@ -160,7 +160,7 @@ impl Handler for SubstitutionStatusHandler {
|
||||
) -> color_eyre::Result<bool> {
|
||||
match action {
|
||||
Action::Start {
|
||||
start_type: StartFields::CopyPath { path, .. },
|
||||
start_type: StartFields::CopyPath { .. },
|
||||
id,
|
||||
..
|
||||
} => {
|
||||
@@ -177,24 +177,24 @@ impl Handler for SubstitutionStatusHandler {
|
||||
}
|
||||
|
||||
Action::Result {
|
||||
id,
|
||||
fields:
|
||||
ResultFields::SetExpected {
|
||||
action: ActionType::FileTransfer,
|
||||
expected,
|
||||
},
|
||||
..
|
||||
} => {
|
||||
self.max_transfer = *expected;
|
||||
self.draw_bar(state.term_width);
|
||||
Ok(true)
|
||||
}
|
||||
Action::Result {
|
||||
id,
|
||||
fields:
|
||||
ResultFields::SetExpected {
|
||||
action: ActionType::CopyPath,
|
||||
expected,
|
||||
},
|
||||
..
|
||||
} => {
|
||||
self.max_copy = *expected;
|
||||
self.draw_bar(state.term_width);
|
||||
|
||||
@@ -16,7 +16,7 @@ impl<'s> BarSegment<'s> {
|
||||
|
||||
fn length(&self) -> u64 {
|
||||
match self {
|
||||
BarSegment::Dynamic(c, len) => *len,
|
||||
BarSegment::Dynamic(_c, len) => *len,
|
||||
BarSegment::Static(c) => c.len() as u64,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ pub fn extract_package_name(path: &str) -> Option<Vec<&str>> {
|
||||
|
||||
let name_parts: Vec<&str> = parts
|
||||
.iter()
|
||||
.take_while(|part| !part.chars().next().map_or(false, |c| c.is_ascii_digit()))
|
||||
.take_while(|part| !part.chars().next().is_some_and(|c| c.is_ascii_digit()))
|
||||
.copied()
|
||||
.collect();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use std::{io, marker::PhantomData, rc::Rc};
|
||||
use std::{io, rc::Rc};
|
||||
|
||||
use console::style;
|
||||
use indicatif::{MultiProgress, ProgressBar, ProgressFinish, ProgressStyle};
|
||||
|
||||
Reference in New Issue
Block a user