@@ -2839,9 +2839,9 @@ impl<'a> PersistenceNotifierGuard<'a, fn() -> NotifyOption> {
2839
2839
Self::optionally_notify(cm, || -> NotifyOption { NotifyOption::DoPersist })
2840
2840
}
2841
2841
2842
- #[rustfmt::skip]
2843
- fn optionally_notify<F: FnOnce() -> NotifyOption, C: AChannelManager>( cm: &'a C, persist_check: F)
2844
- -> PersistenceNotifierGuard<'a, impl FnOnce() -> NotifyOption> {
2842
+ fn optionally_notify<F: FnOnce() -> NotifyOption, C: AChannelManager>(
2843
+ cm: &'a C, persist_check: F,
2844
+ ) -> PersistenceNotifierGuard<'a, impl FnOnce() -> NotifyOption> {
2845
2845
let read_guard = cm.get_cm().total_consistency_lock.read().unwrap();
2846
2846
let force_notify = cm.get_cm().process_background_events();
2847
2847
@@ -2855,8 +2855,12 @@ impl<'a> PersistenceNotifierGuard<'a, fn() -> NotifyOption> {
2855
2855
match (notify, force_notify) {
2856
2856
(NotifyOption::DoPersist, _) => NotifyOption::DoPersist,
2857
2857
(_, NotifyOption::DoPersist) => NotifyOption::DoPersist,
2858
- (NotifyOption::SkipPersistHandleEvents, _) => NotifyOption::SkipPersistHandleEvents,
2859
- (_, NotifyOption::SkipPersistHandleEvents) => NotifyOption::SkipPersistHandleEvents,
2858
+ (NotifyOption::SkipPersistHandleEvents, _) => {
2859
+ NotifyOption::SkipPersistHandleEvents
2860
+ },
2861
+ (_, NotifyOption::SkipPersistHandleEvents) => {
2862
+ NotifyOption::SkipPersistHandleEvents
2863
+ },
2860
2864
_ => NotifyOption::SkipPersistNoEvents,
2861
2865
}
2862
2866
}),
@@ -2882,15 +2886,13 @@ impl<'a> PersistenceNotifierGuard<'a, fn() -> NotifyOption> {
2882
2886
}
2883
2887
2884
2888
impl<'a, F: FnOnce() -> NotifyOption> Drop for PersistenceNotifierGuard<'a, F> {
2885
- #[rustfmt::skip]
2886
2889
fn drop(&mut self) {
2887
2890
match (self.should_persist.take().unwrap())() {
2888
2891
NotifyOption::DoPersist => {
2889
2892
self.needs_persist_flag.store(true, Ordering::Release);
2890
2893
self.event_persist_notifier.notify()
2891
2894
},
2892
- NotifyOption::SkipPersistHandleEvents =>
2893
- self.event_persist_notifier.notify(),
2895
+ NotifyOption::SkipPersistHandleEvents => self.event_persist_notifier.notify(),
2894
2896
NotifyOption::SkipPersistNoEvents => {},
2895
2897
}
2896
2898
}
0 commit comments