mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-04-28 15:30:54 +00:00
cleanup: fix clippy warnings
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
parent
af6c02e658
commit
c363123d9b
12
src/main.rs
12
src/main.rs
@ -748,8 +748,9 @@ impl Default for ToEntry {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Copy, Clone)]
|
||||
#[derive(Debug, PartialEq, Copy, Clone, Default)]
|
||||
enum DStatus {
|
||||
#[default]
|
||||
Invalid,
|
||||
Accept,
|
||||
Quarantine,
|
||||
@ -762,12 +763,6 @@ enum DStatus {
|
||||
Dsn(u32),
|
||||
}
|
||||
|
||||
impl Default for DStatus {
|
||||
fn default() -> Self {
|
||||
DStatus::Invalid
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for DStatus {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let c = match self {
|
||||
@ -1314,6 +1309,7 @@ impl QEntry {
|
||||
true
|
||||
}
|
||||
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
fn from_to_matches(&mut self, parser: &Parser) -> bool {
|
||||
if !parser.options.from.is_empty() {
|
||||
if self.from.is_empty() {
|
||||
@ -2368,7 +2364,7 @@ fn parse_host_service_pid(data: &[u8]) -> Option<(ByteSlice, ByteSlice, u64, Byt
|
||||
.count();
|
||||
let service = &data[0..service_count];
|
||||
let data = &data[service_count..];
|
||||
if data.get(0) != Some(&b'[') {
|
||||
if data.first() != Some(&b'[') {
|
||||
return None;
|
||||
}
|
||||
let data = &data[1..];
|
||||
|
Loading…
Reference in New Issue
Block a user