File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -354,14 +354,15 @@ where
354354 S : StorageBacking + StorageSubscriber < S > ,
355355 T : Serialize + DeserializeOwned + Clone + Send + Sync + PartialEq + ' static ,
356356{
357+ #[ allow( clippy:: collapsible_if) ]
357358 fn save ( & self ) {
358359 // We want to save in the following conditions
359360 // - The value from the channel is different from the current value
360361 // - The value from the channel could not be determined, likely because it hasn't been set yet
361- if let Some ( payload) = self . channel . borrow ( ) . data . downcast_ref :: < T > ( )
362- && * self . entry . data . read ( ) == * payload
363- {
364- return ;
362+ if let Some ( payload) = self . channel . borrow ( ) . data . downcast_ref :: < T > ( ) {
363+ if * self . entry . data . read ( ) == * payload {
364+ return ;
365+ }
365366 }
366367 self . entry . save ( ) ;
367368 }
You can’t perform that action at this time.
0 commit comments