Skip to content

Commit 991d2fb

Browse files
committed
fix lints
1 parent 782aaab commit 991d2fb

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

benches/savina_pong.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ mod reactors {
453453
impl ::reactor_rt::assembly::ReactorInitializer for SavinaPongAdapter {
454454
type Wrapped = SavinaPong;
455455
type Params = SavinaPongParams;
456-
const MAX_REACTION_ID: ::reactor_rt::LocalReactionId = ::reactor_rt::LocalReactionId::new(1 - 1);
456+
const MAX_REACTION_ID: ::reactor_rt::LocalReactionId = ::reactor_rt::LocalReactionId::new(0);
457457

458458
fn assemble(
459459
__params: Self::Params,

src/actions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<T: Sync, K> ReactionTrigger<T> for Action<K, T> {
116116
#[cfg(not(feature = "no-unsafe"))]
117117
impl<T: Sync, K> triggers::ReactionTriggerWithRefAccess<T> for Action<K, T> {
118118
fn get_value_ref(&self, now: &EventTag, _start: &Instant) -> Option<&T> {
119-
self.map.get(&Reverse(*now)).map(|a| a.as_ref()).flatten()
119+
self.map.get(&Reverse(*now)).and_then(|a| a.as_ref())
120120
}
121121
}
122122

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
#[macro_use]
6262
extern crate array_macro;
6363
#[cfg(test)]
64-
#[macro_use]
6564
#[allow(unused)]
65+
#[macro_use]
6666
extern crate assert_matches;
6767
#[macro_use]
6868
extern crate index_vec;
@@ -94,12 +94,12 @@ pub use self::util::*;
9494
pub mod test;
9595

9696
mod actions;
97-
pub(self) mod ids;
97+
mod ids;
9898
mod ports;
9999
mod scheduler;
100100
mod time;
101101
mod timers;
102-
pub(self) mod triggers;
102+
mod triggers;
103103
mod util;
104104

105105
pub mod assembly;

src/scheduler/dependencies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ pub mod test {
776776

777777
fn new_ports<const N: usize>(&mut self, names: [&'static str; N]) -> [TriggerId; N] {
778778
let result = array![_ => self.fixture.next_trigger_id.get_and_incr().unwrap(); N];
779-
for (i, p) in (&result).iter().enumerate() {
779+
for (i, p) in result.iter().enumerate() {
780780
self.fixture.graph.record_port(*p);
781781
self.fixture.debug_info.record_trigger(*p, Cow::Borrowed(names[i]));
782782
}

src/scheduler/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ pub mod internals {
4545
pub use super::dependencies::{ExecutableReactions, Level, LevelIx, ReactionLevelInfo};
4646
}
4747

48-
pub(self) type ReactionPlan<'x> = Option<Cow<'x, ExecutableReactions<'x>>>;
49-
pub(self) type ReactorBox<'a> = Box<dyn ReactorBehavior + 'a>;
50-
pub(self) type ReactorVec<'a> = IndexVec<ReactorId, ReactorBox<'a>>;
48+
type ReactionPlan<'x> = Option<Cow<'x, ExecutableReactions<'x>>>;
49+
type ReactorBox<'a> = Box<dyn ReactorBehavior + 'a>;
50+
type ReactorVec<'a> = IndexVec<ReactorId, ReactorBox<'a>>;
5151

5252
/// Can format stuff for trace messages.
5353
#[derive(Clone)]
54-
pub(self) struct DebugInfoProvider<'a> {
54+
struct DebugInfoProvider<'a> {
5555
id_registry: &'a DebugInfoRegistry,
5656
}
5757

0 commit comments

Comments
 (0)