Remove all unsafe usage#137
clippy
30 warnings
Details
Results
| Message level | Amount |
|---|---|
| Internal compiler error | 0 |
| Error | 0 |
| Warning | 30 |
| Note | 0 |
| Help | 0 |
Versions
- rustc 1.96.1 (31fca3adb 2026-06-26)
- cargo 1.96.1 (356927216 2026-06-26)
- clippy 0.1.96 (31fca3adb2 2026-06-26)
Annotations
Check warning on line 811 in src/serialization/interval_log/mod.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/serialization/interval_log/mod.rs:811:27
|
811 | fn fract_sec_tuple(input: &[u8]) -> FResult {
| ^^^^^ ^^^^^^^ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
811 | fn fract_sec_tuple(input: &[u8]) -> FResult<'_> {
| ++++
Check warning on line 739 in src/serialization/interval_log/mod.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/serialization/interval_log/mod.rs:739:25
|
739 | fn interval_hist(input: &[u8]) -> IResult<&[u8], LogEntry> {
| ^^^^^ ^^^^^ ^^^^^^^^ the same lifetime is hidden here
| | |
| | the same lifetime is elided here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
739 | fn interval_hist(input: &[u8]) -> IResult<&[u8], LogEntry<'_>> {
| ++++
Check warning on line 734 in src/serialization/interval_log/mod.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/serialization/interval_log/mod.rs:734:22
|
734 | fn tag_parser(input: &[u8]) -> IResult<&[u8], Tag> {
| ^^^^^ ^^^^^ ^^^ the same lifetime is hidden here
| | |
| | the same lifetime is elided here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
734 | fn tag_parser(input: &[u8]) -> IResult<&[u8], Tag<'_>> {
| ++++
Check warning on line 718 in src/serialization/interval_log/mod.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/serialization/interval_log/mod.rs:718:21
|
718 | fn base_time(input: &[u8]) -> IResult<&[u8], LogEntry> {
| ^^^^^ ^^^^^ ^^^^^^^^ the same lifetime is hidden here
| | |
| | the same lifetime is elided here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
718 | fn base_time(input: &[u8]) -> IResult<&[u8], LogEntry<'_>> {
| ++++
Check warning on line 709 in src/serialization/interval_log/mod.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/serialization/interval_log/mod.rs:709:22
|
709 | fn start_time(input: &[u8]) -> IResult<&[u8], LogEntry> {
| ^^^^^ ^^^^^ ^^^^^^^^ the same lifetime is hidden here
| | |
| | the same lifetime is elided here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
709 | fn start_time(input: &[u8]) -> IResult<&[u8], LogEntry<'_>> {
| ++++
Check warning on line 12 in src/iterators/all.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/iterators/all.rs:12:34
|
12 | pub fn new<T: Counter>(hist: &Histogram<T>) -> HistogramIterator<T, Iter> {
| ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
12 | pub fn new<T: Counter>(hist: &Histogram<T>) -> HistogramIterator<'_, T, Iter> {
| +++
Check warning on line 1243 in src/lib.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/lib.rs:1243:21
|
1243 | pub fn iter_all(&self) -> HistogramIterator<T, iterators::all::Iter> {
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
1243 | pub fn iter_all(&self) -> HistogramIterator<'_, T, iterators::all::Iter> {
| +++
Check warning on line 1184 in src/lib.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/lib.rs:1184:26
|
1184 | pub fn iter_recorded(&self) -> HistogramIterator<T, iterators::recorded::Iter> {
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
1184 | pub fn iter_recorded(&self) -> HistogramIterator<'_, T, iterators::recorded::Iter> {
| +++
Check warning on line 1146 in src/lib.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/lib.rs:1146:21
|
1146 | pub fn iter_log(&self, start: u64, exp: f64) -> HistogramIterator<T, iterators::log::Iter<T>> {
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | the same lifetime is hidden here
| | the same lifetime is hidden here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
1146 | pub fn iter_log(&self, start: u64, exp: f64) -> HistogramIterator<'_, T, iterators::log::Iter<'_, T>> {
| +++ +++
Check warning on line 1108 in src/lib.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/lib.rs:1108:24
|
1108 | pub fn iter_linear(&self, step: u64) -> HistogramIterator<T, iterators::linear::Iter<T>> {
| ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | the same lifetime is hidden here
| | the same lifetime is hidden here
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
|
1108 | pub fn iter_linear(&self, step: u64) -> HistogramIterator<'_, T, iterators::linear::Iter<'_, T>> {
| +++ +++
Check warning on line 1046 in src/lib.rs
github-actions / clippy
hiding a lifetime that's elided elsewhere is confusing
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/lib.rs:1046:9
|
1046 | &self,
| ^^^^^ the lifetime is elided here
1047 | ticks_per_half_distance: u32,
1048 | ) -> HistogramIterator<T, iterators::quantile::Iter<T>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | |
| | the same lifetime is hidden here
| the same lifetime is hidden here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
1048 | ) -> HistogramIterator<'_, T, iterators::quantile::Iter<'_, T>> {
| +++ +++
Check warning on line 705 in src/serialization/interval_log/mod.rs
github-actions / clippy
this multiplication by -1 can be written more succinctly
warning: this multiplication by -1 can be written more succinctly
--> src/serialization/interval_log/mod.rs:705:19
|
705 | Err(t) => duration_as_fp_seconds(t.duration()) * -1_f64,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-duration_as_fp_seconds(t.duration())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#neg_multiply
= note: `#[warn(clippy::neg_multiply)]` on by default
Check warning on line 107 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:107:5
|
107 | //! guess whether or not the intervals are absolute or deltas.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
107 | //! guess whether or not the intervals are absolute or deltas.
| ++
Check warning on line 106 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:106:5
|
106 | //! per-interval deltas to get a wall-clock time for each interval. No heuristics are applied to
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
106 | //! per-interval deltas to get a wall-clock time for each interval. No heuristics are applied to
| ++
Check warning on line 105 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:105:5
|
105 | //! present: it's a number of seconds since epoch that serves as the starting point for the
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
105 | //! present: it's a number of seconds since epoch that serves as the starting point for the
| ++
Check warning on line 103 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:103:5
|
103 | //! erroneous behavior when filtering by offset timestamps.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
103 | //! erroneous behavior when filtering by offset timestamps.
| ++
Check warning on line 102 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:102:5
|
102 | //! This is likely a bug, since StartTime should be an absolute timestamp, and appears to cause
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
102 | //! This is likely a bug, since StartTime should be an absolute timestamp, and appears to cause
| ++
Check warning on line 101 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:101:5
|
101 | //! interpreted as deltas. The first interval's (delta) timestamp is stored to the StartTime field.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
101 | //! interpreted as deltas. The first interval's (delta) timestamp is stored to the StartTime field.
| ++
Check warning on line 99 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:99:5
|
99 | //! more than a year's worth of seconds smaller than StartTime and as absolute timestamps otherwise.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
99 | //! more than a year's worth of seconds smaller than StartTime and as absolute timestamps otherwise.
| ++
Check warning on line 98 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:98:5
|
98 | //! to StartTime. Specifically, the heuristic interprets interval timestamps as deltas if they are
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
98 | //! to StartTime. Specifically, the heuristic interprets interval timestamps as deltas if they are
| ++
Check warning on line 97 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:97:5
|
97 | //! heuristic. In other words, the heuristic chooses between setting the effective BaseTime to 0 or
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
97 | //! heuristic. In other words, the heuristic chooses between setting the effective BaseTime to 0 or
| ++
Check warning on line 96 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:96:5
|
96 | //! may be interpreted as deltas to be added to StartTime or as "absolute" Unix time depending on a
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
help: indent this line
|
96 | //! may be interpreted as deltas to be added to StartTime or as "absolute" Unix time depending on a
| ++
Check warning on line 94 in src/serialization/interval_log/mod.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> src/serialization/interval_log/mod.rs:94:5
|
94 | //! since the epoch. The first interval's timestamp is stored to the StartTime field.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
94 | //! since the epoch. The first interval's timestamp is stored to the StartTime field.
| ++
Check warning on line 168 in src/serialization/deserializer.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/serialization/deserializer.rs:168:27
|
168 | reader.read_exact(&mut payload_slice)?;
| ^^^^^^^^^^^^^^^^^^ help: change this to: `payload_slice`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 1709 in src/lib.rs
github-actions / clippy
usage of a legacy numeric method
warning: usage of a legacy numeric method
--> src/lib.rs:1709:45
|
1709 | self.min_non_zero_value = if min == u64::max_value() {
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#legacy_numeric_constants
help: use the associated constant instead
|
1709 - self.min_non_zero_value = if min == u64::max_value() {
1709 + self.min_non_zero_value = if min == u64::MAX {
|