Skip to content

Commit 9076fe1

Browse files
committed
Disable unnecessary_wraps clippy warning
1 parent fbe61ce commit 9076fe1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/timeline.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,17 @@ fn bounds(interval: &Interval) -> (f64, f64) {
110110
}
111111

112112
// label for activities
113+
// Wrapping with `Option` is unnecessary but this signature
114+
// is expected by `Renderer`
115+
#[allow(clippy::unnecessary_wraps)]
113116
fn label(interval: &Interval, colors: &[RGB]) -> Option<Label> {
114117
let (activity_id, activity) = interval;
115118
Some((activity.get_title(), color(*activity_id, colors)))
116119
}
117120

118121
// label for legend
122+
// Wrapping with `Option` is unnecessary but this signature
123+
// is expected by `Renderer`
119124
fn legend(interval: &Interval) -> Option<Label> {
120125
let (_activity_id, activity) = interval;
121126
let start_time: DateTime<Local> = activity.get_start_time().into();

0 commit comments

Comments
 (0)