Skip to content

Commit

Permalink
refactor(clippy): fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon committed Oct 30, 2023
1 parent 28102bc commit 5a28961
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions src/core/event_engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ mod should {
Transition {
invocations: self
.exit()
.unwrap_or(vec![])
.unwrap_or_default()
.into_iter()
.chain(invocations.unwrap_or(vec![]))
.chain(state.enter().unwrap_or(vec![]))
.chain(invocations.unwrap_or_default())
.chain(state.enter().unwrap_or_default())
.collect(),
state,
}
Expand Down
6 changes: 3 additions & 3 deletions src/dx/presence/event_engine/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ impl State for PresenceState {
Transition {
invocations: self
.exit()
.unwrap_or(vec![])
.unwrap_or_default()
.into_iter()
.chain(invocations.unwrap_or(vec![]))
.chain(state.enter().unwrap_or(vec![]))
.chain(invocations.unwrap_or_default())
.chain(state.enter().unwrap_or_default())
.collect(),
state,
}
Expand Down
4 changes: 2 additions & 2 deletions src/dx/subscribe/event_engine/effects/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ pub(super) async fn execute(
) -> Vec<SubscribeEvent> {
info!(
"Handshake for\nchannels: {:?}\nchannel groups: {:?}",
input.channels().unwrap_or(Vec::new()),
input.channel_groups().unwrap_or(Vec::new())
input.channels().unwrap_or_default(),
input.channel_groups().unwrap_or_default()
);

if input.is_empty {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub(super) async fn execute(

info!(
"Handshake reconnection for\nchannels: {:?}\nchannel groups: {:?}",
input.channels().unwrap_or(Vec::new()),
input.channel_groups().unwrap_or(Vec::new())
input.channels().unwrap_or_default(),
input.channel_groups().unwrap_or_default()
);

if input.is_empty {
Expand Down
4 changes: 2 additions & 2 deletions src/dx/subscribe/event_engine/effects/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub(crate) async fn execute(
info!(
"Receive at {:?} for\nchannels: {:?}\nchannel groups: {:?}",
cursor.timetoken,
input.channels().unwrap_or(Vec::new()),
input.channel_groups().unwrap_or(Vec::new())
input.channels().unwrap_or_default(),
input.channel_groups().unwrap_or_default()
);

if input.is_empty {
Expand Down
4 changes: 2 additions & 2 deletions src/dx/subscribe/event_engine/effects/receive_reconnection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub(crate) async fn execute(
info!(
"Receive reconnection at {:?} for\nchannels: {:?}\nchannel groups: {:?}",
cursor.timetoken,
input.channels().unwrap_or(Vec::new()),
input.channel_groups().unwrap_or(Vec::new())
input.channels().unwrap_or_default(),
input.channel_groups().unwrap_or_default()
);

if input.is_empty {
Expand Down
6 changes: 3 additions & 3 deletions src/dx/subscribe/event_engine/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,10 @@ impl State for SubscribeState {
Transition {
invocations: self
.exit()
.unwrap_or(vec![])
.unwrap_or_default()
.into_iter()
.chain(invocations.unwrap_or(vec![]))
.chain(state.enter().unwrap_or(vec![]))
.chain(invocations.unwrap_or_default())
.chain(state.enter().unwrap_or_default())
.collect(),
state,
}
Expand Down

0 comments on commit 5a28961

Please sign in to comment.