Skip to content

Commit

Permalink
ServerTiming: fix clippy warnings
Browse files Browse the repository at this point in the history
This should unblock CI on main.
  • Loading branch information
Fishrock123 committed Aug 24, 2020
1 parent 97a7c82 commit a870b5f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/trace/server_timing/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ mod test {
use std::time::Duration;

#[test]
#[allow(clippy::redundant_clone)]
fn encode() -> crate::Result<()> {
let name = String::from("Server");
let dur = Duration::from_secs(1);
Expand Down
2 changes: 1 addition & 1 deletion src/trace/server_timing/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ mod test {
fn assert_entry(s: &str, n: &str, du: Option<u64>, de: Option<&str>) -> crate::Result<()> {
let e = parse_entry(s)?;
assert_eq!(e.name(), n);
assert_eq!(e.duration(), du.map(|du| Duration::from_millis(du)));
assert_eq!(e.duration(), du.map(Duration::from_millis));
assert_eq!(e.description(), de);
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const SECONDS_IN_HOUR: u64 = 3600;
/// Format using the `Display` trait.
/// Convert timestamp into/from `SytemTime` to use.
/// Supports comparison and sorting.
#[derive(Copy, Clone, Debug, Eq, Ord)]
#[derive(Copy, Clone, Debug, Eq)]
pub(crate) struct HttpDate {
/// 0...59
second: u8,
Expand Down

0 comments on commit a870b5f

Please sign in to comment.