Skip to content

Commit

Permalink
Merge pull request #36 from Guara92/reduce_chrono_features
Browse files Browse the repository at this point in the history
Reduce chrono features
  • Loading branch information
mcasper authored Jul 5, 2022
2 parents 1f5a240 + a02566f commit b3ea9f4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/mcasper/dogstatsd-rs"
keywords = ["datadog", "dogstatsd", "client"]

[dependencies]
chrono = "0.4"
chrono = { version = "0.4", default-features = false, features = ["clock"] }

[features]
unstable = []
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Options {
from_addr: from_addr.into(),
to_addr: to_addr.into(),
namespace: namespace.into(),
default_tags: default_tags
default_tags
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ impl<'a> Metric for TimeMetric<'a> {
impl<'a> TimeMetric<'a> {
pub fn new(stat: &'a str, start_time: &'a DateTime<Utc>, end_time: &'a DateTime<Utc>) -> Self {
TimeMetric {
start_time: start_time,
end_time: end_time,
stat: stat,
start_time,
end_time,
stat,
}
}
}
Expand All @@ -142,8 +142,8 @@ impl<'a> Metric for TimingMetric<'a> {
impl<'a> TimingMetric<'a> {
pub fn new(stat: &'a str, ms: i64) -> Self {
TimingMetric {
ms: ms,
stat: stat,
ms,
stat,
}
}
}
Expand All @@ -168,8 +168,8 @@ impl<'a> Metric for GaugeMetric<'a> {
impl<'a> GaugeMetric<'a> {
pub fn new(stat: &'a str, val: &'a str) -> Self {
GaugeMetric {
stat: stat,
val: val,
stat,
val,
}
}
}
Expand All @@ -194,8 +194,8 @@ impl<'a> Metric for HistogramMetric<'a> {
impl<'a> HistogramMetric<'a> {
pub fn new(stat: &'a str, val: &'a str) -> Self {
HistogramMetric {
stat: stat,
val: val,
stat,
val,
}
}
}
Expand All @@ -220,8 +220,8 @@ impl<'a>Metric for DistributionMetric<'a> {
impl<'a> DistributionMetric<'a> {
pub fn new(stat: &'a str, val: &'a str) -> Self {
DistributionMetric {
stat: stat,
val: val,
stat,
val,
}
}
}
Expand All @@ -246,8 +246,8 @@ impl<'a> Metric for SetMetric<'a> {
impl<'a> SetMetric<'a> {
pub fn new(stat: &'a str, val: &'a str) -> Self {
SetMetric {
stat: stat,
val: val,
stat,
val,
}
}
}
Expand Down Expand Up @@ -348,9 +348,9 @@ impl<'a> Metric for ServiceCheck<'a> {
impl<'a> ServiceCheck<'a> {
pub fn new(stat: &'a str, val: ServiceStatus, options: ServiceCheckOptions) -> Self {
ServiceCheck {
stat: stat,
val: val,
options: options,
stat,
val,
options,
}
}
}
Expand Down Expand Up @@ -384,8 +384,8 @@ impl<'a> Metric for Event<'a> {
impl<'a> Event<'a> {
pub fn new(title: &'a str, text: &'a str) -> Self {
Event {
title: title,
text: text,
title,
text,
}
}
}
Expand Down

0 comments on commit b3ea9f4

Please sign in to comment.