Skip to content

Commit 5a9cfbb

Browse files
committed
Fix msrv/no_std build errors
1 parent e001c7a commit 5a9cfbb

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl<T: Unpin> Event<T> {
347347

348348
if let Some(inner) = self.try_inner() {
349349
let limit = if notify.is_additional() {
350-
usize::MAX
350+
core::usize::MAX
351351
} else {
352352
notify.count()
353353
};
@@ -949,6 +949,7 @@ impl<T> State<T> {
949949
}
950950

951951
/// If this state was notified, return the tag associated with the notification.
952+
#[allow(unused)]
952953
fn notified(self) -> Option<T> {
953954
match self {
954955
Self::Notified { tag, .. } => Some(tag),

src/no_std.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use core::num::NonZeroUsize;
3131
use core::ops;
3232
use core::pin::Pin;
3333

34+
use alloc::boxed::Box;
3435
use alloc::vec::Vec;
3536

3637
impl<T: Unpin> crate::Inner<T> {

src/notify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ macro_rules! impl_for_numeric_types {
323323
type Tag = ();
324324
type Notify = Notify;
325325

326+
#[allow(unused_comparisons)]
326327
fn into_notification(self) -> Self::Notify {
327-
#[allow(unused_comparisons)]
328328
if self < 0 {
329329
panic!("negative notification count");
330330
}

0 commit comments

Comments
 (0)