Skip to content

Commit

Permalink
Fix msrv/no_std build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
notgull committed Apr 3, 2023
1 parent f7a2e5b commit 3e6efed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl<T: Unpin> Event<T> {

if let Some(inner) = self.try_inner() {
let limit = if notify.is_additional() {
usize::MAX
core::usize::MAX
} else {
notify.count()
};
Expand Down Expand Up @@ -942,6 +942,7 @@ impl<T> State<T> {
}

/// If this state was notified, return the tag associated with the notification.
#[allow(unused)]
fn notified(self) -> Option<T> {
match self {
Self::Notified { tag, .. } => Some(tag),
Expand Down
1 change: 1 addition & 0 deletions src/no_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use core::num::NonZeroUsize;
use core::ops;
use core::pin::Pin;

use alloc::boxed::Box;
use alloc::vec::Vec;

impl<T: Unpin> crate::Inner<T> {
Expand Down
2 changes: 1 addition & 1 deletion src/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ macro_rules! impl_for_numeric_types {
type Tag = ();
type Notify = Notify;

#[allow(unused_comparisons)]
fn into_notification(self) -> Self::Notify {
#[allow(unused_comparisons)]
if self < 0 {
panic!("negative notification count");
}
Expand Down

0 comments on commit 3e6efed

Please sign in to comment.