Fix clippy warning: use self by value for Copy type
Change to_unix_timestamp to take self by value instead of &self since Timestamp is Copy
This commit is contained in:
parent
03dab21a0a
commit
efea6e3c64
2 changed files with 1 additions and 2 deletions
|
|
@ -2,7 +2,6 @@ use crate::config::{AgentConfig, HeartbeatMetadata};
|
|||
use crate::metrics::Metric;
|
||||
use crate::proto::agent;
|
||||
use prost::Message;
|
||||
use serde_json::json;
|
||||
use std::time::Duration;
|
||||
use thiserror::Error;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ impl Timestamp {
|
|||
Self::now().secs - self.secs
|
||||
}
|
||||
|
||||
pub fn to_unix_timestamp(&self) -> i64 {
|
||||
pub fn to_unix_timestamp(self) -> i64 {
|
||||
self.secs
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue