Skip to content

Commit 7d281ec

Browse files
dvdskjoboet
andauthored
sleep_until: disable allow(unused) on platform where its not unused
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
1 parent 5065a35 commit 7d281ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ impl Instant {
408408
self.0.checked_sub_duration(&duration).map(Instant)
409409
}
410410

411-
// used by platform specific `sleep_until` implementations.
412-
#[allow(unused, reason = "not every platform has a specific `sleep_until`")]
411+
// Used by platform specific `sleep_until` implementations such as the one used on Linux.
412+
#[cfg_attr(not(target_os = "linux"), allow(unused, reason = "not every platform has a specific `sleep_until`"))]
413413
pub(crate) fn into_inner(self) -> time::Instant {
414414
self.0
415415
}

0 commit comments

Comments
 (0)