mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-10-04 13:06:05 +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 {
|
enum DStatus {
|
||||||
|
#[default]
|
||||||
Invalid,
|
Invalid,
|
||||||
Accept,
|
Accept,
|
||||||
Quarantine,
|
Quarantine,
|
||||||
@ -762,12 +763,6 @@ enum DStatus {
|
|||||||
Dsn(u32),
|
Dsn(u32),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for DStatus {
|
|
||||||
fn default() -> Self {
|
|
||||||
DStatus::Invalid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl std::fmt::Display for DStatus {
|
impl std::fmt::Display for DStatus {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let c = match self {
|
let c = match self {
|
||||||
@ -1314,6 +1309,7 @@ impl QEntry {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_to_matches(&mut self, parser: &Parser) -> bool {
|
fn from_to_matches(&mut self, parser: &Parser) -> bool {
|
||||||
if !parser.options.from.is_empty() {
|
if !parser.options.from.is_empty() {
|
||||||
if self.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();
|
.count();
|
||||||
let service = &data[0..service_count];
|
let service = &data[0..service_count];
|
||||||
let data = &data[service_count..];
|
let data = &data[service_count..];
|
||||||
if data.get(0) != Some(&b'[') {
|
if data.first() != Some(&b'[') {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let data = &data[1..];
|
let data = &data[1..];
|
||||||
|
Loading…
Reference in New Issue
Block a user