diff --git a/src/core/event_engine/mod.rs b/src/core/event_engine/mod.rs index e4394f6b..450d5684 100644 --- a/src/core/event_engine/mod.rs +++ b/src/core/event_engine/mod.rs @@ -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, } diff --git a/src/dx/presence/event_engine/state.rs b/src/dx/presence/event_engine/state.rs index 09d0d24a..6af5ecc3 100644 --- a/src/dx/presence/event_engine/state.rs +++ b/src/dx/presence/event_engine/state.rs @@ -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, } diff --git a/src/dx/subscribe/event_engine/effects/handshake.rs b/src/dx/subscribe/event_engine/effects/handshake.rs index 587df86a..5327c635 100644 --- a/src/dx/subscribe/event_engine/effects/handshake.rs +++ b/src/dx/subscribe/event_engine/effects/handshake.rs @@ -15,8 +15,8 @@ pub(super) async fn execute( ) -> Vec { 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 { diff --git a/src/dx/subscribe/event_engine/effects/handshake_reconnection.rs b/src/dx/subscribe/event_engine/effects/handshake_reconnection.rs index d35c83b4..2cf5a6a5 100644 --- a/src/dx/subscribe/event_engine/effects/handshake_reconnection.rs +++ b/src/dx/subscribe/event_engine/effects/handshake_reconnection.rs @@ -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 { diff --git a/src/dx/subscribe/event_engine/effects/receive.rs b/src/dx/subscribe/event_engine/effects/receive.rs index 1829892b..0f2d7830 100644 --- a/src/dx/subscribe/event_engine/effects/receive.rs +++ b/src/dx/subscribe/event_engine/effects/receive.rs @@ -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 { diff --git a/src/dx/subscribe/event_engine/effects/receive_reconnection.rs b/src/dx/subscribe/event_engine/effects/receive_reconnection.rs index eb472902..f3875f49 100644 --- a/src/dx/subscribe/event_engine/effects/receive_reconnection.rs +++ b/src/dx/subscribe/event_engine/effects/receive_reconnection.rs @@ -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 { diff --git a/src/dx/subscribe/event_engine/state.rs b/src/dx/subscribe/event_engine/state.rs index a4070258..f097c383 100644 --- a/src/dx/subscribe/event_engine/state.rs +++ b/src/dx/subscribe/event_engine/state.rs @@ -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, }