[INFO] fetching crate log-analysis 0.1.6... [INFO] linting log-analysis-0.1.6 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate log-analysis 0.1.6 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate log-analysis 0.1.6 [INFO] finished tweaking crates.io crate log-analysis 0.1.6 [INFO] tweaked toml for crates.io crate log-analysis 0.1.6 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate log-analysis 0.1.6 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate log-analysis 0.1.6 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded derive_builder_macro v0.20.0 [INFO] [stderr] Downloaded derive_builder_core v0.20.0 [INFO] [stderr] Downloaded derive_builder v0.20.0 [INFO] [stderr] Downloaded lru v0.12.4 [INFO] [stderr] Downloaded flate2 v1.0.31 [INFO] [stderr] Downloaded rustls-webpki v0.102.6 [INFO] [stderr] Downloaded rustls v0.23.12 [INFO] [stderr] Downloaded tokio v1.39.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6c91406b22abaabb26229d5d411348c021185eda28793cd2739b6b03f600f4cf [INFO] running `Command { std: "docker" "start" "-a" "6c91406b22abaabb26229d5d411348c021185eda28793cd2739b6b03f600f4cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6c91406b22abaabb26229d5d411348c021185eda28793cd2739b6b03f600f4cf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6c91406b22abaabb26229d5d411348c021185eda28793cd2739b6b03f600f4cf", kill_on_drop: false }` [INFO] [stdout] 6c91406b22abaabb26229d5d411348c021185eda28793cd2739b6b03f600f4cf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a15bf3da8e44626a33634e836b8c9f2d9822f7a3fde0f5f3548dc1aa1e43c86c [INFO] running `Command { std: "docker" "start" "-a" "a15bf3da8e44626a33634e836b8c9f2d9822f7a3fde0f5f3548dc1aa1e43c86c", kill_on_drop: false }` [INFO] [stderr] Checking bytes v1.7.1 [INFO] [stderr] Compiling cc v1.1.14 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Checking allocator-api2 v0.2.18 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Compiling syn v2.0.72 [INFO] [stderr] Checking mio v1.0.2 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Checking socket2 v0.5.7 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Compiling serde v1.0.207 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Checking miniz_oxide v0.7.4 [INFO] [stderr] Checking unicode-normalization v0.1.23 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking unicode-bidi v0.3.15 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking either v1.13.0 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Checking gimli v0.28.1 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Checking tokio v1.39.3 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking object v0.32.2 [INFO] [stderr] Checking rustc-demangle v0.1.24 [INFO] [stderr] Checking owo-colors v3.5.0 [INFO] [stderr] Checking indenter v0.3.3 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Compiling serde_json v1.0.124 [INFO] [stderr] Checking unicode-width v0.1.13 [INFO] [stderr] Checking unicode-segmentation v1.11.0 [INFO] [stderr] Checking rustls-pki-types v1.8.0 [INFO] [stderr] Checking eyre v0.6.12 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking rustls-pemfile v2.1.3 [INFO] [stderr] Checking compact_str v0.8.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking sync_wrapper v1.0.1 [INFO] [stderr] Checking tracing-error v0.2.0 [INFO] [stderr] Checking ipnet v2.9.0 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking flate2 v1.0.31 [INFO] [stderr] Checking indexmap v2.4.0 [INFO] [stderr] Checking lru v0.12.4 [INFO] [stderr] Checking url v2.5.2 [INFO] [stderr] Checking color-spantrace v0.2.1 [INFO] [stderr] Compiling openssl-sys v0.9.103 [INFO] [stderr] Compiling backtrace v0.3.71 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Compiling openssl v0.10.66 [INFO] [stderr] Compiling native-tls v0.2.12 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking addr2line v0.21.0 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling serde_derive v1.0.207 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling instability v0.3.2 [INFO] [stderr] Checking h2 v0.4.6 [INFO] [stderr] Checking color-eyre v0.6.3 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling derive_builder_core v0.20.0 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking ratatui v0.28.1 [INFO] [stderr] Compiling derive_builder_macro v0.20.0 [INFO] [stderr] Checking derive_builder v0.20.0 [INFO] [stderr] Checking hyper v1.4.1 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking hyper-util v0.1.7 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.7 [INFO] [stderr] Checking log-analysis v0.1.6 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `crate::types::helpers::print_type_of` [INFO] [stdout] --> src/zeek/zeek_log.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::types::helpers::print_type_of; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/zeek/zeek_log.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | use std::io::{Read, Write, BufReader, BufRead}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/zeek/zeek_log.rs:14:32 [INFO] [stdout] | [INFO] [stdout] 14 | use std::collections::{HashMap,HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> src/zeek/zeek_log.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DateTime` and `Utc` [INFO] [stdout] --> src/zeek/zeek_log.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | use chrono::{DateTime, Utc}; [INFO] [stdout] | ^^^^^^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::error::Error` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::types::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::zeek::zeek_log_proto::ZeekProtocol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/ip2location.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `Mutex` [INFO] [stdout] --> src/ip2location.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::{Arc,Mutex}; [INFO] [stdout] | ^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/ip2location.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::zeek::zeek_log_proto::ZeekProtocol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log::SummaryData` [INFO] [stdout] --> src/ip2location.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::zeek::zeek_log::SummaryData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::helpers::print_type_of` [INFO] [stdout] --> src/ip2location.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::types::helpers::print_type_of; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::helpers::print_type_of` [INFO] [stdout] --> src/zeek/zeek_log.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::types::helpers::print_type_of; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/zeek/zeek_log.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 13 | use std::io::{Read, Write, BufReader, BufRead}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `HashSet` [INFO] [stdout] --> src/zeek/zeek_log.rs:14:32 [INFO] [stdout] | [INFO] [stdout] 14 | use std::collections::{HashMap,HashSet}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> src/zeek/zeek_log.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | use serde::{Serialize, Deserialize}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DateTime` and `Utc` [INFO] [stdout] --> src/zeek/zeek_log.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | use chrono::{DateTime, Utc}; [INFO] [stdout] | ^^^^^^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::error::Error` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::types::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::zeek::zeek_log_proto::ZeekProtocol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/ip2location.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `Mutex` [INFO] [stdout] --> src/ip2location.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::{Arc,Mutex}; [INFO] [stdout] | ^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/ip2location.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::zeek::zeek_log_proto::ZeekProtocol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::zeek::zeek_log::SummaryData` [INFO] [stdout] --> src/ip2location.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::zeek::zeek_log::SummaryData; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::types::helpers::print_type_of` [INFO] [stdout] --> src/ip2location.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::types::helpers::print_type_of; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> src/zeek/zeek_log.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | use std::io::{Read, Write, BufReader, BufRead}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let mut count: usize = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let mut s = String::new(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | let mut d = GzDecoder::new(file); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut d = GzDecoder::new(file); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:181:29 [INFO] [stdout] | [INFO] [stdout] 181 | let mut iter = std::iter::zip(&fields,&data); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:208:29 [INFO] [stdout] | [INFO] [stdout] 208 | let mut iter = std::iter::zip(&fields,&data); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `proto_type_set` is assigned to, but never used [INFO] [stdout] --> src/zeek/zeek_log.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | let mut proto_type_set = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_proto_type_set` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fields_set` is assigned to, but never used [INFO] [stdout] --> src/zeek/zeek_log.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let mut fields_set = false; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_fields_set` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/zeek/zeek_log.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let mut count: usize = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/zeek/zeek_log.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `proto_type_set` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | proto_type_set = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `fields_set` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:140:25 [INFO] [stdout] | [INFO] [stdout] 140 | fields_set = true; // enables the data insertions [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `data` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:173:51 [INFO] [stdout] | [INFO] [stdout] 173 | let mut data: Vec<&str> = Vec::<&str>::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `data` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:200:51 [INFO] [stdout] | [INFO] [stdout] 200 | let mut data: Vec<&str> = Vec::<&str>::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:334:13 [INFO] [stdout] | [INFO] [stdout] 334 | let mut map: HashMap = HashMap::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `proto` [INFO] [stdout] --> src/zeek/zeek_log.rs:336:14 [INFO] [stdout] | [INFO] [stdout] 336 | for (proto, protovalue) in &self.raw [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_proto` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `timefield` [INFO] [stdout] --> src/zeek/zeek_log.rs:338:18 [INFO] [stdout] | [INFO] [stdout] 338 | for (timefield, timevalue) in protovalue.iter() [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timefield` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> src/zeek/zeek_log.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 13 | use std::io::{Read, Write, BufReader, BufRead}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:433:25 [INFO] [stdout] | [INFO] [stdout] 433 | let mut arc_ip2locresponse = Arc::new(Mutex::new(IP2LocationResponse::new())); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | let mut count = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/zeek/zeek_log.rs:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | let mut count = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `val` [INFO] [stdout] --> src/zeek/zeek_log.rs:422:21 [INFO] [stdout] | [INFO] [stdout] 422 | for (ip,val) in arc_data.lock().unwrap().iter_mut() [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_val` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 46 | (None, None, None) => return 0, [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 47 | (None, None, Some(_end)) => return 1, [INFO] [stdout] | ------------------------ matches some of the same values [INFO] [stdout] 48 | (None, Some(_log), None) => return 2, [INFO] [stdout] | ------------------------ matches some of the same values [INFO] [stdout] 49 | (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^ ...and 4 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | (Some(src_ip), None, None) => return 4, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:52:19 [INFO] [stdout] | [INFO] [stdout] 52 | (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:53:19 [INFO] [stdout] | [INFO] [stdout] 53 | (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_date_format` is never used [INFO] [stdout] --> src/zeek/zeek_search_params.rs:96:8 [INFO] [stdout] | [INFO] [stdout] 34 | impl<'a> ZeekSearchParams<'a> [INFO] [stdout] | ----------------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 96 | fn check_date_format(p: &'a Path) -> bool [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/types.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod types; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let mut count: usize = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let mut s = String::new(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:93:13 [INFO] [stdout] | [INFO] [stdout] 93 | let mut d = GzDecoder::new(file); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut d = GzDecoder::new(file); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:181:29 [INFO] [stdout] | [INFO] [stdout] 181 | let mut iter = std::iter::zip(&fields,&data); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:208:29 [INFO] [stdout] | [INFO] [stdout] 208 | let mut iter = std::iter::zip(&fields,&data); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `proto_type_set` is assigned to, but never used [INFO] [stdout] --> src/zeek/zeek_log.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | let mut proto_type_set = false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_proto_type_set` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `fields_set` is assigned to, but never used [INFO] [stdout] --> src/zeek/zeek_log.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let mut fields_set = false; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_fields_set` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/zeek/zeek_log.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | let mut count: usize = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/zeek/zeek_log.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `proto_type_set` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | proto_type_set = true; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `fields_set` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:140:25 [INFO] [stdout] | [INFO] [stdout] 140 | fields_set = true; // enables the data insertions [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `data` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:173:51 [INFO] [stdout] | [INFO] [stdout] 173 | let mut data: Vec<&str> = Vec::<&str>::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `data` is never read [INFO] [stdout] --> src/zeek/zeek_log.rs:200:51 [INFO] [stdout] | [INFO] [stdout] 200 | let mut data: Vec<&str> = Vec::<&str>::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:334:13 [INFO] [stdout] | [INFO] [stdout] 334 | let mut map: HashMap = HashMap::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `proto` [INFO] [stdout] --> src/zeek/zeek_log.rs:336:14 [INFO] [stdout] | [INFO] [stdout] 336 | for (proto, protovalue) in &self.raw [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_proto` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `timefield` [INFO] [stdout] --> src/zeek/zeek_log.rs:338:18 [INFO] [stdout] | [INFO] [stdout] 338 | for (timefield, timevalue) in protovalue.iter() [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_timefield` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:433:25 [INFO] [stdout] | [INFO] [stdout] 433 | let mut arc_ip2locresponse = Arc::new(Mutex::new(IP2LocationResponse::new())); [INFO] [stdout] | ----^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/zeek/zeek_log.rs:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | let mut count = 0; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/zeek/zeek_log.rs:418:17 [INFO] [stdout] | [INFO] [stdout] 418 | let mut count = 0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `val` [INFO] [stdout] --> src/zeek/zeek_log.rs:422:21 [INFO] [stdout] | [INFO] [stdout] 422 | for (ip,val) in arc_data.lock().unwrap().iter_mut() [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_val` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/zeek/zeek_log.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | if self.ip_address.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.ip_address.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ZeekLog` [INFO] [stdout] --> src/zeek/zeek_log.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / pub fn new() -> Self [INFO] [stdout] 70 | | { [INFO] [stdout] 71 | | ZeekLog { [INFO] [stdout] 72 | | raw: BTreeMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 65 + impl Default for ZeekLog { [INFO] [stdout] 66 + fn default() -> Self { [INFO] [stdout] 67 + Self::new() [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `fields_ref` [INFO] [stdout] --> src/zeek/zeek_log.rs:136:34 [INFO] [stdout] | [INFO] [stdout] 136 | for i in 1..fields_ref.len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 136 - for i in 1..fields_ref.len() [INFO] [stdout] 136 + for in fields_ref.iter().skip(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 46 | (None, None, None) => return 0, [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 47 | (None, None, Some(_end)) => return 1, [INFO] [stdout] | ------------------------ matches some of the same values [INFO] [stdout] 48 | (None, Some(_log), None) => return 2, [INFO] [stdout] | ------------------------ matches some of the same values [INFO] [stdout] 49 | (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] | ------------------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^ ...and 4 other patterns collectively make this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:50:19 [INFO] [stdout] | [INFO] [stdout] 50 | (Some(src_ip), None, None) => return 4, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:52:19 [INFO] [stdout] | [INFO] [stdout] 52 | (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/zeek/zeek_log.rs:163:19 [INFO] [stdout] | [INFO] [stdout] 163 | match search_bits as u8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `search_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src_ip` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:53:19 [INFO] [stdout] | [INFO] [stdout] 53 | (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_src_ip` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:169:29 [INFO] [stdout] | [INFO] [stdout] 169 | ... header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:196:29 [INFO] [stdout] | [INFO] [stdout] 196 | ... header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/zeek/zeek_log.rs:385:50 [INFO] [stdout] | [INFO] [stdout] 385 | if !self.raw.contains_key(&proto) && !(proto == ZeekProtocol::NONE) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(proto != ZeekProtocol::NONE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_log.rs:460:9 [INFO] [stdout] | [INFO] [stdout] 460 | return Ok(()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 460 - return Ok(()) [INFO] [stdout] 460 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/zeek/zeek_log.rs:372:40 [INFO] [stdout] | [INFO] [stdout] 372 | for entry in std::fs::read_dir(&path).expect("error reading path") [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `check_date_format` is never used [INFO] [stdout] --> src/zeek/zeek_search_params.rs:96:8 [INFO] [stdout] | [INFO] [stdout] 34 | impl<'a> ZeekSearchParams<'a> [INFO] [stdout] | ----------------------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 96 | fn check_date_format(p: &'a Path) -> bool [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_log.rs:438:51 [INFO] [stdout] | [INFO] [stdout] 438 | ... let ip_addr = request(&entry.get_ip_address()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `entry.get_ip_address()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/types.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod types; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 46 | (None, None, None) => return 0, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - (None, None, None) => return 0, [INFO] [stdout] 46 + (None, None, None) => 0, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:47:41 [INFO] [stdout] | [INFO] [stdout] 47 | (None, None, Some(_end)) => return 1, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - (None, None, Some(_end)) => return 1, [INFO] [stdout] 47 + (None, None, Some(_end)) => 1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:48:41 [INFO] [stdout] | [INFO] [stdout] 48 | (None, Some(_log), None) => return 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - (None, Some(_log), None) => return 2, [INFO] [stdout] 48 + (None, Some(_log), None) => 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:49:47 [INFO] [stdout] | [INFO] [stdout] 49 | (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] 49 + (None, Some(_log), Some(_end)) => 3, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:50:43 [INFO] [stdout] | [INFO] [stdout] 50 | (Some(src_ip), None, None) => return 4, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - (Some(src_ip), None, None) => return 4, [INFO] [stdout] 50 + (Some(src_ip), None, None) => 4, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:51:49 [INFO] [stdout] | [INFO] [stdout] 51 | (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] 51 + (Some(src_ip), None, Some(_end)) => 5, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:52:49 [INFO] [stdout] | [INFO] [stdout] 52 | (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] 52 + (Some(src_ip), Some(_log), None) => 6, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:53:55 [INFO] [stdout] | [INFO] [stdout] 53 | (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] 53 + (Some(src_ip), Some(_log), Some(_end)) => 7, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - _ => return 8 // value should not be greater than 7. [INFO] [stdout] 54 + _ => 8 // value should not be greater than 7. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:65:34 [INFO] [stdout] | [INFO] [stdout] 65 | search_path.push_str(&self.path_prefix.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path_prefix.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:67:34 [INFO] [stdout] | [INFO] [stdout] 67 | search_path.push_str(&self.selected_date.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.selected_date.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:72:34 [INFO] [stdout] | [INFO] [stdout] 72 | search_path.push_str(&self.selected_date.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.selected_date.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/zeek/zeek_search_params.rs:77:48 [INFO] [stdout] | [INFO] [stdout] 77 | if search_path.as_bytes()[0] as u16 == 126 as u16 [INFO] [stdout] | ^^^^^^^^^^ help: try: `126_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | Some(_) => { return true } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 90 - Some(_) => { return true } [INFO] [stdout] 90 + Some(_) => { true } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:91:23 [INFO] [stdout] | [INFO] [stdout] 91 | None => { return false} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 91 - None => { return false} [INFO] [stdout] 91 + None => { false} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `v` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | for i in 0..v.len() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 112 - for i in 0..v.len() [INFO] [stdout] 112 + for in &v [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:115:24 [INFO] [stdout] | [INFO] [stdout] 115 | if let Err(_) = number [INFO] [stdout] | -------^^^^^^--------- help: try: `if number.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `IP2LocationResponse` [INFO] [stdout] --> src/ip2location.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self//IP2LocationResponse [INFO] [stdout] 29 | | { [INFO] [stdout] 30 | | IP2LocationResponse { [INFO] [stdout] 31 | | ip: None, [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for IP2LocationResponse { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:148:52 [INFO] [stdout] | [INFO] [stdout] 148 | match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' ')) [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:148:52 [INFO] [stdout] | [INFO] [stdout] 148 | match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ') [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:150:84 [INFO] [stdout] | [INFO] [stdout] 150 | ... "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' '))));}, [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:150:84 [INFO] [stdout] | [INFO] [stdout] 150 | ... "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:151:104 [INFO] [stdout] | [INFO] [stdout] 151 | ...ing::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' '))));}, [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:151:104 [INFO] [stdout] | [INFO] [stdout] 151 | ...de(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/ip2location.rs:174:25 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn request(ip_addr: &String) -> Result [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 174 ~ pub fn request(ip_addr: &str) -> Result [INFO] [stdout] 175 | { [INFO] [stdout] ... [INFO] [stdout] 211 | .expect("add IP2LOCATION_API_KEY to $CARGO_HOME/config.toml"); [INFO] [stdout] 212 ~ let url = format!("https://api.ip2location.io/?key={}&ip={}&format=json",api_key, ip_addr); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/zeek/zeek_log.rs:455:17 [INFO] [stdout] | [INFO] [stdout] 455 | handle.join(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 455 | let _ = handle.join(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/zeek/zeek_log.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | if self.ip_address.len() < 1 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.ip_address.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ZeekLog` [INFO] [stdout] --> src/zeek/zeek_log.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / pub fn new() -> Self [INFO] [stdout] 70 | | { [INFO] [stdout] 71 | | ZeekLog { [INFO] [stdout] 72 | | raw: BTreeMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 75 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 65 + impl Default for ZeekLog { [INFO] [stdout] 66 + fn default() -> Self { [INFO] [stdout] 67 + Self::new() [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `fields_ref` [INFO] [stdout] --> src/zeek/zeek_log.rs:136:34 [INFO] [stdout] | [INFO] [stdout] 136 | for i in 1..fields_ref.len() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 136 - for i in 1..fields_ref.len() [INFO] [stdout] 136 + for in fields_ref.iter().skip(1) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/zeek/zeek_log.rs:163:19 [INFO] [stdout] | [INFO] [stdout] 163 | match search_bits as u8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `search_bits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:169:29 [INFO] [stdout] | [INFO] [stdout] 169 | ... header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/zeek/zeek_log.rs:196:29 [INFO] [stdout] | [INFO] [stdout] 196 | ... header_line = header_line + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `header_line += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/zeek/zeek_log.rs:385:50 [INFO] [stdout] | [INFO] [stdout] 385 | if !self.raw.contains_key(&proto) && !(proto == ZeekProtocol::NONE) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(proto != ZeekProtocol::NONE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_log.rs:460:9 [INFO] [stdout] | [INFO] [stdout] 460 | return Ok(()) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 460 - return Ok(()) [INFO] [stdout] 460 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/zeek/zeek_log.rs:372:40 [INFO] [stdout] | [INFO] [stdout] 372 | for entry in std::fs::read_dir(&path).expect("error reading path") [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_log.rs:438:51 [INFO] [stdout] | [INFO] [stdout] 438 | ... let ip_addr = request(&entry.get_ip_address()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `entry.get_ip_address()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:46:35 [INFO] [stdout] | [INFO] [stdout] 46 | (None, None, None) => return 0, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 46 - (None, None, None) => return 0, [INFO] [stdout] 46 + (None, None, None) => 0, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:47:41 [INFO] [stdout] | [INFO] [stdout] 47 | (None, None, Some(_end)) => return 1, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 47 - (None, None, Some(_end)) => return 1, [INFO] [stdout] 47 + (None, None, Some(_end)) => 1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:48:41 [INFO] [stdout] | [INFO] [stdout] 48 | (None, Some(_log), None) => return 2, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 48 - (None, Some(_log), None) => return 2, [INFO] [stdout] 48 + (None, Some(_log), None) => 2, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:49:47 [INFO] [stdout] | [INFO] [stdout] 49 | (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 49 - (None, Some(_log), Some(_end)) => return 3, [INFO] [stdout] 49 + (None, Some(_log), Some(_end)) => 3, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:50:43 [INFO] [stdout] | [INFO] [stdout] 50 | (Some(src_ip), None, None) => return 4, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 50 - (Some(src_ip), None, None) => return 4, [INFO] [stdout] 50 + (Some(src_ip), None, None) => 4, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:51:49 [INFO] [stdout] | [INFO] [stdout] 51 | (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 51 - (Some(src_ip), None, Some(_end)) => return 5, [INFO] [stdout] 51 + (Some(src_ip), None, Some(_end)) => 5, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:52:49 [INFO] [stdout] | [INFO] [stdout] 52 | (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 52 - (Some(src_ip), Some(_log), None) => return 6, [INFO] [stdout] 52 + (Some(src_ip), Some(_log), None) => 6, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:53:55 [INFO] [stdout] | [INFO] [stdout] 53 | (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 53 - (Some(src_ip), Some(_log), Some(_end)) => return 7, [INFO] [stdout] 53 + (Some(src_ip), Some(_log), Some(_end)) => 7, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | _ => return 8 // value should not be greater than 7. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 54 - _ => return 8 // value should not be greater than 7. [INFO] [stdout] 54 + _ => 8 // value should not be greater than 7. [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:65:34 [INFO] [stdout] | [INFO] [stdout] 65 | search_path.push_str(&self.path_prefix.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path_prefix.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:67:34 [INFO] [stdout] | [INFO] [stdout] 67 | search_path.push_str(&self.selected_date.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.selected_date.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/zeek/zeek_search_params.rs:72:34 [INFO] [stdout] | [INFO] [stdout] 72 | search_path.push_str(&self.selected_date.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.selected_date.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/zeek/zeek_search_params.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | search_path.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `search_path.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u16` is unnecessary [INFO] [stdout] --> src/zeek/zeek_search_params.rs:77:48 [INFO] [stdout] | [INFO] [stdout] 77 | if search_path.as_bytes()[0] as u16 == 126 as u16 [INFO] [stdout] | ^^^^^^^^^^ help: try: `126_u16` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:90:26 [INFO] [stdout] | [INFO] [stdout] 90 | Some(_) => { return true } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 90 - Some(_) => { return true } [INFO] [stdout] 90 + Some(_) => { true } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/zeek/zeek_search_params.rs:91:23 [INFO] [stdout] | [INFO] [stdout] 91 | None => { return false} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 91 - None => { return false} [INFO] [stdout] 91 + None => { false} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `v` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:112:22 [INFO] [stdout] | [INFO] [stdout] 112 | for i in 0..v.len() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 112 - for i in 0..v.len() [INFO] [stdout] 112 + for in &v [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/zeek/zeek_search_params.rs:115:24 [INFO] [stdout] | [INFO] [stdout] 115 | if let Err(_) = number [INFO] [stdout] | -------^^^^^^--------- help: try: `if number.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `IP2LocationResponse` [INFO] [stdout] --> src/ip2location.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self//IP2LocationResponse [INFO] [stdout] 29 | | { [INFO] [stdout] 30 | | IP2LocationResponse { [INFO] [stdout] 31 | | ip: None, [INFO] [stdout] ... | [INFO] [stdout] 44 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for IP2LocationResponse { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:148:52 [INFO] [stdout] | [INFO] [stdout] 148 | match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' ')) [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:148:52 [INFO] [stdout] | [INFO] [stdout] 148 | match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ') [INFO] [stdout] | [INFO] [stdout] 148 - match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ') [INFO] [stdout] 148 + match item[0].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ') [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:150:84 [INFO] [stdout] | [INFO] [stdout] 150 | ... "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' '))));}, [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:150:84 [INFO] [stdout] | [INFO] [stdout] 150 | ... "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] 150 - "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 150 + "ip" => {self.set_ip(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:151:104 [INFO] [stdout] | [INFO] [stdout] 151 | ...ing::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n' && c != ' '))));}, [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ip2location.rs:151:104 [INFO] [stdout] | [INFO] [stdout] 151 | ...de(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| !(c != '"' && c != '\t' && c != '\n') || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] 151 - "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == '"' || c == ' ')));}, [INFO] [stdout] 151 + "country_code" => {self.set_country_code(String::from(item[1].trim_matches(|c| c == '"' || c == '\t' || c == '\n' || c == ' ')));}, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/ip2location.rs:174:25 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn request(ip_addr: &String) -> Result [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 174 ~ pub fn request(ip_addr: &str) -> Result [INFO] [stdout] 175 | { [INFO] [stdout] ... [INFO] [stdout] 211 | .expect("add IP2LOCATION_API_KEY to $CARGO_HOME/config.toml"); [INFO] [stdout] 212 ~ let url = format!("https://api.ip2location.io/?key={}&ip={}&format=json",api_key, ip_addr); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/zeek/zeek_log.rs:455:17 [INFO] [stdout] | [INFO] [stdout] 455 | handle.join(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 455 | let _ = handle.join(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `types::error::Error`, `types::helpers::print_type_of`, and `zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> tests/zeek_search.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | zeek::zeek_log_proto::ZeekProtocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | types::error::Error, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | types::helpers::print_type_of, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::path::Path` [INFO] [stdout] --> tests/zeek_search.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::path::Path; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `types::error::Error`, `types::helpers::print_type_of`, and `zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | zeek::zeek_log_proto::ZeekProtocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | types::error::Error, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | types::helpers::print_type_of, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `prelude::*` [INFO] [stdout] --> src/main.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | use ratatui::{prelude::*, widgets::canvas::*}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ratatui::symbols::scrollbar` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use ratatui::symbols::scrollbar; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `KeyEvent` [INFO] [stdout] --> src/main.rs:19:39 [INFO] [stdout] | [INFO] [stdout] 19 | crossterm::event::{self, KeyCode, KeyEvent, KeyEventKind}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `Mutex` [INFO] [stdout] --> src/main.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::{Arc,Mutex}; [INFO] [stdout] | ^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Tab_0_Focus` should have an upper camel case name [INFO] [stdout] --> src/main.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Tab_0_Focus [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `Tab0Focus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Tab_0_InfoState` should have an upper camel case name [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | struct Tab_0_InfoState [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Tab0InfoState` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `types::error::Error`, `types::helpers::print_type_of`, and `zeek::zeek_log_proto::ZeekProtocol` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | zeek::zeek_log_proto::ZeekProtocol, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | types::error::Error, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 6 | types::helpers::print_type_of, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `prelude::*` [INFO] [stdout] --> src/main.rs:12:15 [INFO] [stdout] | [INFO] [stdout] 12 | use ratatui::{prelude::*, widgets::canvas::*}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ratatui::symbols::scrollbar` [INFO] [stdout] --> src/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | use ratatui::symbols::scrollbar; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:599:17 [INFO] [stdout] | [INFO] [stdout] 599 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `KeyEvent` [INFO] [stdout] --> src/main.rs:19:39 [INFO] [stdout] | [INFO] [stdout] 19 | crossterm::event::{self, KeyCode, KeyEvent, KeyEventKind}, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:600:17 [INFO] [stdout] | [INFO] [stdout] 600 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `Mutex` [INFO] [stdout] --> src/main.rs:24:17 [INFO] [stdout] | [INFO] [stdout] 24 | use std::sync::{Arc,Mutex}; [INFO] [stdout] | ^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Tab_0_Focus` should have an upper camel case name [INFO] [stdout] --> src/main.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Tab_0_Focus [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `Tab0Focus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Tab_0_InfoState` should have an upper camel case name [INFO] [stdout] --> src/main.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | struct Tab_0_InfoState [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `Tab0InfoState` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:599:17 [INFO] [stdout] | [INFO] [stdout] 599 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:600:17 [INFO] [stdout] | [INFO] [stdout] 600 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> tests/zeek_search.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | let res = log.search(¶ms); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> tests/zeek_search.rs:73:42 [INFO] [stdout] | [INFO] [stdout] 73 | let mut file = std::fs::File::create(&path).expect("should be able to create the file."); [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 84 - assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] 84 + assert!(!(log.summary.len() == 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/zeek_search.rs:84:23 [INFO] [stdout] | [INFO] [stdout] 84 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> tests/zeek_search.rs:85:20 [INFO] [stdout] | [INFO] [stdout] 85 | for (ip, _) in &log.summary [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 85 - for (ip, _) in &log.summary [INFO] [stdout] 85 + for ip in log.summary.keys() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 99 - assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] 99 + assert!(!(log.summary.len() == 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/zeek_search.rs:99:23 [INFO] [stdout] | [INFO] [stdout] 99 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> tests/zeek_search.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | for (ip, _) in &log.summary [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 100 - for (ip, _) in &log.summary [INFO] [stdout] 100 + for ip in log.summary.keys() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 114 - assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] 114 + assert!(!(log.summary.len() == 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/zeek_search.rs:114:23 [INFO] [stdout] | [INFO] [stdout] 114 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> tests/zeek_search.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | for (ip, _) in &log.summary [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 115 - for (ip, _) in &log.summary [INFO] [stdout] 115 + for ip in log.summary.keys() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:129:5 [INFO] [stdout] | [INFO] [stdout] 129 | assert_eq!(true, dir.summary.is_empty()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 129 - assert_eq!(true, dir.summary.is_empty()); [INFO] [stdout] 129 + assert!(dir.summary.is_empty()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 201 - assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] 201 + assert!(!(log.summary.len() == 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/zeek_search.rs:201:23 [INFO] [stdout] | [INFO] [stdout] 201 | assert_eq!(false, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> tests/zeek_search.rs:213:5 [INFO] [stdout] | [INFO] [stdout] 213 | assert_eq!(true, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 213 - assert_eq!(true, log.summary.len() == 0); [INFO] [stdout] 213 + assert!(log.summary.len() == 0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> tests/zeek_search.rs:213:22 [INFO] [stdout] | [INFO] [stdout] 213 | assert_eq!(true, log.summary.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:765:19 [INFO] [stdout] | [INFO] [stdout] 765 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:770:19 [INFO] [stdout] | [INFO] [stdout] 770 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:775:19 [INFO] [stdout] | [INFO] [stdout] 775 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:780:19 [INFO] [stdout] | [INFO] [stdout] 780 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:765:19 [INFO] [stdout] | [INFO] [stdout] 765 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufRead` [INFO] [stdout] --> src/main.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | use std::io::{self, BufRead}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:770:19 [INFO] [stdout] | [INFO] [stdout] 770 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:775:19 [INFO] [stdout] | [INFO] [stdout] 775 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `ratatui::Frame::<'_>::set_cursor`: the method set_cursor_position indicates more clearly what about the cursor to set [INFO] [stdout] --> src/main.rs:780:19 [INFO] [stdout] | [INFO] [stdout] 780 | frame.set_cursor(cursor_x,cursor_y); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BufRead` [INFO] [stdout] --> src/main.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | use std::io::{self, BufRead}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 395 | ... _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 383 | ... MenuFocus::IpInput => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 386 | ... MenuFocus::StartInput => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 389 | ... MenuFocus::EndInput => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 392 | ... MenuFocus::BaseDirInput => { [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 395 | ... _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:406:29 [INFO] [stdout] | [INFO] [stdout] 406 | ... _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:406:29 [INFO] [stdout] | [INFO] [stdout] 402 | ... MenuFocus::IpInput => state.ip.push(c), [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 403 | ... MenuFocus::StartInput => state.start_date.push(c), [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] 404 | ... MenuFocus::EndInput => state.end_date.push(c), [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] 405 | ... MenuFocus::BaseDirInput => state.base_dir.push(c), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 406 | ... _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 395 | ... _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:395:29 [INFO] [stdout] | [INFO] [stdout] 383 | ... MenuFocus::IpInput => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 386 | ... MenuFocus::StartInput => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 389 | ... MenuFocus::EndInput => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 392 | ... MenuFocus::BaseDirInput => { [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 395 | ... _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:406:29 [INFO] [stdout] | [INFO] [stdout] 406 | ... _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:406:29 [INFO] [stdout] | [INFO] [stdout] 402 | ... MenuFocus::IpInput => state.ip.push(c), [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] 403 | ... MenuFocus::StartInput => state.start_date.push(c), [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] 404 | ... MenuFocus::EndInput => state.end_date.push(c), [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] 405 | ... MenuFocus::BaseDirInput => state.base_dir.push(c), [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] 406 | ... _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let mut ip_input = String::new(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | let mut list_state = ListState::default(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:320:45 [INFO] [stdout] | [INFO] [stdout] 320 | ... let mut from_log_data = curr_log.summary.clone(); [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_input` [INFO] [stdout] --> src/main.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let mut ip_input = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `end_date` [INFO] [stdout] --> src/main.rs:282:37 [INFO] [stdout] | [INFO] [stdout] 282 | ... let end_date: &str = &end.format("%Y-%m-%d").to_string(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_end_date` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:292:37 [INFO] [stdout] | [INFO] [stdout] 292 | ... let res = main_log.search(¶ms); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from_log_data` [INFO] [stdout] --> src/main.rs:320:45 [INFO] [stdout] | [INFO] [stdout] 320 | ... let mut from_log_data = curr_log.summary.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_from_log_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_state` [INFO] [stdout] --> src/main.rs:439:36 [INFO] [stdout] | [INFO] [stdout] 439 | app_mode: &AppMode, list_state: &ListState) [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let mut ip_input = String::new(); [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | let mut list_state = ListState::default(); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:320:45 [INFO] [stdout] | [INFO] [stdout] 320 | ... let mut from_log_data = curr_log.summary.clone(); [INFO] [stdout] | ----^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_input` [INFO] [stdout] --> src/main.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let mut ip_input = String::new(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `end_date` [INFO] [stdout] --> src/main.rs:282:37 [INFO] [stdout] | [INFO] [stdout] 282 | ... let end_date: &str = &end.format("%Y-%m-%d").to_string(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_end_date` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/main.rs:292:37 [INFO] [stdout] | [INFO] [stdout] 292 | ... let res = main_log.search(¶ms); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `from_log_data` [INFO] [stdout] --> src/main.rs:320:45 [INFO] [stdout] | [INFO] [stdout] 320 | ... let mut from_log_data = curr_log.summary.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_from_log_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_state` [INFO] [stdout] --> src/main.rs:439:36 [INFO] [stdout] | [INFO] [stdout] 439 | app_mode: &AppMode, list_state: &ListState) [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_state` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip2location_data` [INFO] [stdout] --> src/main.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip2location_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_para` [INFO] [stdout] --> src/main.rs:543:17 [INFO] [stdout] | [INFO] [stdout] 543 | let some_para = Paragraph::new(String::from("placeholder")) [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_para` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:782:9 [INFO] [stdout] | [INFO] [stdout] 782 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:782:9 [INFO] [stdout] | [INFO] [stdout] 762 | MenuFocus::IpInput => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 767 | MenuFocus::StartInput => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 772 | MenuFocus::EndInput => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 777 | MenuFocus::BaseDirInput => { [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 782 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip2location_data` [INFO] [stdout] --> src/main.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip2location_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_para` [INFO] [stdout] --> src/main.rs:543:17 [INFO] [stdout] | [INFO] [stdout] 543 | let some_para = Paragraph::new(String::from("placeholder")) [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_para` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/main.rs:782:9 [INFO] [stdout] | [INFO] [stdout] 782 | _ => {} [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/main.rs:782:9 [INFO] [stdout] | [INFO] [stdout] 762 | MenuFocus::IpInput => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 767 | MenuFocus::StartInput => { [INFO] [stdout] | --------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 772 | MenuFocus::EndInput => { [INFO] [stdout] | ------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 777 | MenuFocus::BaseDirInput => { [INFO] [stdout] | ----------------------- matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 782 | _ => {} [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `input_text` and `ip2loc_info` are never read [INFO] [stdout] --> src/main.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 61 | struct AppState<'a> [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | input_text: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | ip2loc_info: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AppState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Input` [INFO] [stdout] --> src/main.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / enum MenuFocus [INFO] [stdout] 34 | | { [INFO] [stdout] 35 | | IpInput, [INFO] [stdout] 36 | | StartInput, [INFO] [stdout] 37 | | EndInput, [INFO] [stdout] 38 | | BaseDirInput, [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `input_text` and `ip2loc_info` are never read [INFO] [stdout] --> src/main.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 61 | struct AppState<'a> [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 66 | input_text: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 71 | ip2loc_info: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `AppState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Input` [INFO] [stdout] --> src/main.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / enum MenuFocus [INFO] [stdout] 34 | | { [INFO] [stdout] 35 | | IpInput, [INFO] [stdout] 36 | | StartInput, [INFO] [stdout] 37 | | EndInput, [INFO] [stdout] 38 | | BaseDirInput, [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `res` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:259:47 [INFO] [stdout] | [INFO] [stdout] 255 | ... if res.is_ok() { [INFO] [stdout] | -------------- help: try: `if let Ok() = res` [INFO] [stdout] ... [INFO] [stdout] 259 | ... let res = res.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `res` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:259:47 [INFO] [stdout] | [INFO] [stdout] 255 | ... if res.is_ok() { [INFO] [stdout] | -------------- help: try: `if let Ok() = res` [INFO] [stdout] ... [INFO] [stdout] 259 | ... let res = res.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:149:25 [INFO] [stdout] | [INFO] [stdout] 149 | / match state.tab_index { [INFO] [stdout] 150 | | 0 => { [INFO] [stdout] 151 | | match state.tab_0_focus { [INFO] [stdout] 152 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 165 | | _ => {} [INFO] [stdout] 166 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 149 ~ if state.tab_index == 0 { [INFO] [stdout] 150 + match state.tab_0_focus { [INFO] [stdout] 151 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 152 + if state.ip_index > 0 { state.ip_index -= 1;} [INFO] [stdout] 153 + else { state.ip_index = state.ip_list.len() - 1; } [INFO] [stdout] 154 + } [INFO] [stdout] 155 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 156 + state.tab_0_state.vertical_scroll = [INFO] [stdout] 157 + state.tab_0_state.vertical_scroll.saturating_add(1); [INFO] [stdout] 158 + state.tab_0_state.vertical_scroll_state = [INFO] [stdout] 159 + state.tab_0_state.vertical_scroll_state [INFO] [stdout] 160 + .position(state.tab_0_state.vertical_scroll); [INFO] [stdout] 161 + } [INFO] [stdout] 162 + } [INFO] [stdout] 163 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:149:25 [INFO] [stdout] | [INFO] [stdout] 149 | / match state.tab_index { [INFO] [stdout] 150 | | 0 => { [INFO] [stdout] 151 | | match state.tab_0_focus { [INFO] [stdout] 152 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 165 | | _ => {} [INFO] [stdout] 166 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 149 ~ if state.tab_index == 0 { [INFO] [stdout] 150 + match state.tab_0_focus { [INFO] [stdout] 151 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 152 + if state.ip_index > 0 { state.ip_index -= 1;} [INFO] [stdout] 153 + else { state.ip_index = state.ip_list.len() - 1; } [INFO] [stdout] 154 + } [INFO] [stdout] 155 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 156 + state.tab_0_state.vertical_scroll = [INFO] [stdout] 157 + state.tab_0_state.vertical_scroll.saturating_add(1); [INFO] [stdout] 158 + state.tab_0_state.vertical_scroll_state = [INFO] [stdout] 159 + state.tab_0_state.vertical_scroll_state [INFO] [stdout] 160 + .position(state.tab_0_state.vertical_scroll); [INFO] [stdout] 161 + } [INFO] [stdout] 162 + } [INFO] [stdout] 163 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:170:25 [INFO] [stdout] | [INFO] [stdout] 170 | / match state.tab_index { [INFO] [stdout] 171 | | 0 => { [INFO] [stdout] 172 | | match state.tab_0_focus { [INFO] [stdout] 173 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 188 | | _ => {} [INFO] [stdout] 189 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ if state.tab_index == 0 { [INFO] [stdout] 171 + match state.tab_0_focus { [INFO] [stdout] 172 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 173 + if state.ip_index < state.ip_list.len() - 1 [INFO] [stdout] 174 + { [INFO] [stdout] 175 + state.ip_index += 1; [INFO] [stdout] 176 + } else { state.ip_index = 0; } [INFO] [stdout] 177 + } [INFO] [stdout] 178 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 179 + state.tab_0_state.vertical_scroll = [INFO] [stdout] 180 + state.tab_0_state.vertical_scroll.saturating_sub(1); [INFO] [stdout] 181 + state.tab_0_state.vertical_scroll_state = [INFO] [stdout] 182 + state.tab_0_state.vertical_scroll_state [INFO] [stdout] 183 + .position(state.tab_0_state.vertical_scroll); [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:170:25 [INFO] [stdout] | [INFO] [stdout] 170 | / match state.tab_index { [INFO] [stdout] 171 | | 0 => { [INFO] [stdout] 172 | | match state.tab_0_focus { [INFO] [stdout] 173 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 188 | | _ => {} [INFO] [stdout] 189 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 170 ~ if state.tab_index == 0 { [INFO] [stdout] 171 + match state.tab_0_focus { [INFO] [stdout] 172 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 173 + if state.ip_index < state.ip_list.len() - 1 [INFO] [stdout] 174 + { [INFO] [stdout] 175 + state.ip_index += 1; [INFO] [stdout] 176 + } else { state.ip_index = 0; } [INFO] [stdout] 177 + } [INFO] [stdout] 178 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 179 + state.tab_0_state.vertical_scroll = [INFO] [stdout] 180 + state.tab_0_state.vertical_scroll.saturating_sub(1); [INFO] [stdout] 181 + state.tab_0_state.vertical_scroll_state = [INFO] [stdout] 182 + state.tab_0_state.vertical_scroll_state [INFO] [stdout] 183 + .position(state.tab_0_state.vertical_scroll); [INFO] [stdout] 184 + } [INFO] [stdout] 185 + } [INFO] [stdout] 186 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:197:25 [INFO] [stdout] | [INFO] [stdout] 197 | / if state.show_info_box == true { state.show_info_box = false; } [INFO] [stdout] 198 | | else { state.show_info_box = true; } [INFO] [stdout] | |____________________________________________________________^ help: you can reduce it to: `state.show_info_box = state.show_info_box != true;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:197:28 [INFO] [stdout] | [INFO] [stdout] 197 | if state.show_info_box == true { state.show_info_box = false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `state.show_info_box` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:201:25 [INFO] [stdout] | [INFO] [stdout] 201 | / match state.tab_index { [INFO] [stdout] 202 | | 0 => { [INFO] [stdout] 203 | | state.tab_0_focus = match state.tab_0_focus { [INFO] [stdout] 204 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 212 | | _ => {} [INFO] [stdout] 213 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 201 ~ if state.tab_index == 0 { [INFO] [stdout] 202 + state.tab_0_focus = match state.tab_0_focus { [INFO] [stdout] 203 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 204 + Tab_0_Focus::ContentArea [INFO] [stdout] 205 + } [INFO] [stdout] 206 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 207 + Tab_0_Focus::IpListArea [INFO] [stdout] 208 + } [INFO] [stdout] 209 + } [INFO] [stdout] 210 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/main.rs:197:25 [INFO] [stdout] | [INFO] [stdout] 197 | / if state.show_info_box == true { state.show_info_box = false; } [INFO] [stdout] 198 | | else { state.show_info_box = true; } [INFO] [stdout] | |____________________________________________________________^ help: you can reduce it to: `state.show_info_box = state.show_info_box != true;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/main.rs:197:28 [INFO] [stdout] | [INFO] [stdout] 197 | if state.show_info_box == true { state.show_info_box = false; } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `state.show_info_box` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:201:25 [INFO] [stdout] | [INFO] [stdout] 201 | / match state.tab_index { [INFO] [stdout] 202 | | 0 => { [INFO] [stdout] 203 | | state.tab_0_focus = match state.tab_0_focus { [INFO] [stdout] 204 | | Tab_0_Focus::IpListArea => { [INFO] [stdout] ... | [INFO] [stdout] 212 | | _ => {} [INFO] [stdout] 213 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 201 ~ if state.tab_index == 0 { [INFO] [stdout] 202 + state.tab_0_focus = match state.tab_0_focus { [INFO] [stdout] 203 + Tab_0_Focus::IpListArea => { [INFO] [stdout] 204 + Tab_0_Focus::ContentArea [INFO] [stdout] 205 + } [INFO] [stdout] 206 + Tab_0_Focus::ContentArea => { [INFO] [stdout] 207 + Tab_0_Focus::IpListArea [INFO] [stdout] 208 + } [INFO] [stdout] 209 + } [INFO] [stdout] 210 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:284:51 [INFO] [stdout] | [INFO] [stdout] 284 | ... let path_prefix = String::from(base); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `base` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:284:51 [INFO] [stdout] | [INFO] [stdout] 284 | ... let path_prefix = String::from(base); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `base` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:358:41 [INFO] [stdout] | [INFO] [stdout] 358 | ... assert!(log.summary.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:412:51 [INFO] [stdout] | [INFO] [stdout] 412 | ... state.info_text = format!("{}", "Enter start date: yyyy-mm-dd"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter start date: yyyy-mm-dd".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:358:41 [INFO] [stdout] | [INFO] [stdout] 358 | ... assert!(log.summary.len() > 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!log.summary.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:416:51 [INFO] [stdout] | [INFO] [stdout] 416 | ... state.info_text = format!("{}", "Enter end date: yyyy-mm-dd "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter end date: yyyy-mm-dd ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:420:51 [INFO] [stdout] | [INFO] [stdout] 420 | ... state.info_text = format!("{}", "Enter the base directory of the logs. [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 421 | | ... \n (eg: basedir/)"); [INFO] [stdout] | |_________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 420 ~ state.info_text = "Enter the base directory of the logs. [INFO] [stdout] 421 ~ \n (eg: basedir/)".to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:425:51 [INFO] [stdout] | [INFO] [stdout] 425 | ... state.info_text = format!("{}", "Enter an IP address."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter an IP address.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:412:51 [INFO] [stdout] | [INFO] [stdout] 412 | ... state.info_text = format!("{}", "Enter start date: yyyy-mm-dd"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter start date: yyyy-mm-dd".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:416:51 [INFO] [stdout] | [INFO] [stdout] 416 | ... state.info_text = format!("{}", "Enter end date: yyyy-mm-dd "); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter end date: yyyy-mm-dd ".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:420:51 [INFO] [stdout] | [INFO] [stdout] 420 | ... state.info_text = format!("{}", "Enter the base directory of the logs. [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 421 | | ... \n (eg: basedir/)"); [INFO] [stdout] | |_________________________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 420 ~ state.info_text = "Enter the base directory of the logs. [INFO] [stdout] 421 ~ \n (eg: basedir/)".to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:425:51 [INFO] [stdout] | [INFO] [stdout] 425 | ... state.info_text = format!("{}", "Enter an IP address."); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Enter an IP address.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:470:5 [INFO] [stdout] | [INFO] [stdout] 470 | / match state.tab_index { [INFO] [stdout] 471 | | 0 => draw_tab_0(frame, state, tab_window[1]), [INFO] [stdout] 472 | | _ => {}, [INFO] [stdout] 473 | | }; [INFO] [stdout] | |_____^ help: try: `if state.tab_index == 0 { draw_tab_0(frame, state, tab_window[1]) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | / let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] 512 | | { [INFO] [stdout] 513 | | Some(data) => { [INFO] [stdout] 514 | | let none = String::from(""); [INFO] [stdout] ... | [INFO] [stdout] 540 | | None => {} [INFO] [stdout] 541 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 511 - let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] 511 + match data.get_ip2location_data() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/main.rs:470:5 [INFO] [stdout] | [INFO] [stdout] 470 | / match state.tab_index { [INFO] [stdout] 471 | | 0 => draw_tab_0(frame, state, tab_window[1]), [INFO] [stdout] 472 | | _ => {}, [INFO] [stdout] 473 | | }; [INFO] [stdout] | |_____^ help: try: `if state.tab_index == 0 { draw_tab_0(frame, state, tab_window[1]) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:511:36 [INFO] [stdout] | [INFO] [stdout] 511 | let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 512 | | { [INFO] [stdout] 513 | | Some(data) => { [INFO] [stdout] 514 | | let none = String::from(""); [INFO] [stdout] ... | [INFO] [stdout] 540 | | None => {} [INFO] [stdout] 541 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 511 ~ let ip2location_data = if let Some(data) = data.get_ip2location_data() { [INFO] [stdout] 512 + let none = String::from(""); [INFO] [stdout] 513 + lat = data.get_latitude().as_ref() [INFO] [stdout] 514 + .unwrap_or(&"0.0".to_string()).parse::().unwrap(); [INFO] [stdout] 515 + lon = data.get_longitude().as_ref() [INFO] [stdout] 516 + .unwrap_or(&"0.0".to_string()).parse::().unwrap(); [INFO] [stdout] 517 + text_list.push(Line::from(format!("Lat: {}",lat))); [INFO] [stdout] 518 + text_list.push(Line::from(format!("Lon: {}",lon))); [INFO] [stdout] 519 + text_list.push(Line::from(format!("IP: {}", [INFO] [stdout] 520 + data.get_ip().as_ref().unwrap_or(&none)))); [INFO] [stdout] 521 + text_list.push(Line::from(format!("Country Code: {}", [INFO] [stdout] 522 + data.get_country_code().as_ref().unwrap_or(&none)))); [INFO] [stdout] 523 + text_list.push(Line::from(format!("Region: {}", [INFO] [stdout] 524 + data.get_region_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 525 + text_list.push(Line::from(format!("City Name: {}", [INFO] [stdout] 526 + data.get_city_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 527 + text_list.push(Line::from(format!("Zipcode: {}", [INFO] [stdout] 528 + data.get_zip_code().as_ref().unwrap_or(&none)))); [INFO] [stdout] 529 + text_list.push(Line::from(format!("Timezone: {}", [INFO] [stdout] 530 + data.get_time_zone().as_ref().unwrap_or(&none)))); [INFO] [stdout] 531 + text_list.push(Line::from(format!("Auto System Number: {}", [INFO] [stdout] 532 + data.get_auto_system_num().as_ref().unwrap_or(&none)))); [INFO] [stdout] 533 + text_list.push(Line::from(format!("Auto System Name: {}", [INFO] [stdout] 534 + data.get_auto_system_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 535 + text_list.push(Line::from(format!("Is a proxy: {}", [INFO] [stdout] 536 + data.get_is_proxy().as_ref().unwrap_or(&none)))); [INFO] [stdout] 537 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/main.rs:511:13 [INFO] [stdout] | [INFO] [stdout] 511 | / let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] 512 | | { [INFO] [stdout] 513 | | Some(data) => { [INFO] [stdout] 514 | | let none = String::from(""); [INFO] [stdout] ... | [INFO] [stdout] 540 | | None => {} [INFO] [stdout] 541 | | }; [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 511 - let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] 511 + match data.get_ip2location_data() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:511:36 [INFO] [stdout] | [INFO] [stdout] 511 | let ip2location_data = match data.get_ip2location_data() [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 512 | | { [INFO] [stdout] 513 | | Some(data) => { [INFO] [stdout] 514 | | let none = String::from(""); [INFO] [stdout] ... | [INFO] [stdout] 540 | | None => {} [INFO] [stdout] 541 | | }; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 511 ~ let ip2location_data = if let Some(data) = data.get_ip2location_data() { [INFO] [stdout] 512 + let none = String::from(""); [INFO] [stdout] 513 + lat = data.get_latitude().as_ref() [INFO] [stdout] 514 + .unwrap_or(&"0.0".to_string()).parse::().unwrap(); [INFO] [stdout] 515 + lon = data.get_longitude().as_ref() [INFO] [stdout] 516 + .unwrap_or(&"0.0".to_string()).parse::().unwrap(); [INFO] [stdout] 517 + text_list.push(Line::from(format!("Lat: {}",lat))); [INFO] [stdout] 518 + text_list.push(Line::from(format!("Lon: {}",lon))); [INFO] [stdout] 519 + text_list.push(Line::from(format!("IP: {}", [INFO] [stdout] 520 + data.get_ip().as_ref().unwrap_or(&none)))); [INFO] [stdout] 521 + text_list.push(Line::from(format!("Country Code: {}", [INFO] [stdout] 522 + data.get_country_code().as_ref().unwrap_or(&none)))); [INFO] [stdout] 523 + text_list.push(Line::from(format!("Region: {}", [INFO] [stdout] 524 + data.get_region_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 525 + text_list.push(Line::from(format!("City Name: {}", [INFO] [stdout] 526 + data.get_city_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 527 + text_list.push(Line::from(format!("Zipcode: {}", [INFO] [stdout] 528 + data.get_zip_code().as_ref().unwrap_or(&none)))); [INFO] [stdout] 529 + text_list.push(Line::from(format!("Timezone: {}", [INFO] [stdout] 530 + data.get_time_zone().as_ref().unwrap_or(&none)))); [INFO] [stdout] 531 + text_list.push(Line::from(format!("Auto System Number: {}", [INFO] [stdout] 532 + data.get_auto_system_num().as_ref().unwrap_or(&none)))); [INFO] [stdout] 533 + text_list.push(Line::from(format!("Auto System Name: {}", [INFO] [stdout] 534 + data.get_auto_system_name().as_ref().unwrap_or(&none)))); [INFO] [stdout] 535 + text_list.push(Line::from(format!("Is a proxy: {}", [INFO] [stdout] 536 + data.get_is_proxy().as_ref().unwrap_or(&none)))); [INFO] [stdout] 537 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/main.rs:562:35 [INFO] [stdout] | [INFO] [stdout] 562 | x: layout[0].x + (layout[0].width * 1 / 100), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `layout[0].width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/main.rs:562:35 [INFO] [stdout] | [INFO] [stdout] 562 | x: layout[0].x + (layout[0].width * 1 / 100), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `layout[0].width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:731:17 [INFO] [stdout] | [INFO] [stdout] 731 | format!("{}", text), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/main.rs:789:8 [INFO] [stdout] | [INFO] [stdout] 789 | if *&input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `input.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/main.rs:798:8 [INFO] [stdout] | [INFO] [stdout] 798 | if *&input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `input.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:731:17 [INFO] [stdout] | [INFO] [stdout] 731 | format!("{}", text), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `text.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:807:8 [INFO] [stdout] | [INFO] [stdout] 807 | if input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/main.rs:789:8 [INFO] [stdout] | [INFO] [stdout] 789 | if *&input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `input.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] = note: `#[warn(clippy::deref_addrof)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: immediately dereferencing a reference [INFO] [stdout] --> src/main.rs:798:8 [INFO] [stdout] | [INFO] [stdout] 798 | if *&input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `input.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:807:8 [INFO] [stdout] | [INFO] [stdout] 807 | if input.len() > 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.88s [INFO] running `Command { std: "docker" "inspect" "a15bf3da8e44626a33634e836b8c9f2d9822f7a3fde0f5f3548dc1aa1e43c86c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a15bf3da8e44626a33634e836b8c9f2d9822f7a3fde0f5f3548dc1aa1e43c86c", kill_on_drop: false }` [INFO] [stdout] a15bf3da8e44626a33634e836b8c9f2d9822f7a3fde0f5f3548dc1aa1e43c86c