Skip to content

Commit 89bcc45

Browse files
authored
Merge pull request #234 from Fishrock123/fix-clippy
src: fix clippy warnings
2 parents 97a7c82 + 3e35fca commit 89bcc45

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions-rs/cargo@v1
4646
with:
4747
command: clippy
48-
args: -- -D warnings
48+
args: --tests --examples -- -D warnings
4949

5050
- name: tests
5151
uses: actions-rs/cargo@v1

src/trace/server_timing/metric.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ mod test {
8080
use std::time::Duration;
8181

8282
#[test]
83+
#[allow(clippy::redundant_clone)]
8384
fn encode() -> crate::Result<()> {
8485
let name = String::from("Server");
8586
let dur = Duration::from_secs(1);

src/trace/server_timing/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ mod test {
175175
fn assert_entry(s: &str, n: &str, du: Option<u64>, de: Option<&str>) -> crate::Result<()> {
176176
let e = parse_entry(s)?;
177177
assert_eq!(e.name(), n);
178-
assert_eq!(e.duration(), du.map(|du| Duration::from_millis(du)));
178+
assert_eq!(e.duration(), du.map(Duration::from_millis));
179179
assert_eq!(e.description(), de);
180180
Ok(())
181181
}

src/utils/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const SECONDS_IN_HOUR: u64 = 3600;
1616
/// Format using the `Display` trait.
1717
/// Convert timestamp into/from `SytemTime` to use.
1818
/// Supports comparison and sorting.
19-
#[derive(Copy, Clone, Debug, Eq, Ord)]
19+
#[derive(Copy, Clone, Debug, Eq)]
2020
pub(crate) struct HttpDate {
2121
/// 0...59
2222
second: u8,

0 commit comments

Comments
 (0)