fix yet more errors with logind backend

This commit is contained in:
Victor Berger 2018-09-25 11:20:17 +02:00
parent 97e960a0f1
commit 95d55f4b96
1 changed files with 4 additions and 0 deletions

View File

@ -215,7 +215,9 @@ impl SessionNotifier for AutoSessionNotifier {
}
}
}
fn unregister(&mut self, signal: Self::Id) {
#[allow(unreachable_patterns)]
match (self, signal) {
#[cfg(feature = "backend_session_logind")]
(&mut AutoSessionNotifier::Logind(ref mut logind), AutoId(AutoIdInternal::Logind(signal))) => {
@ -224,6 +226,8 @@ impl SessionNotifier for AutoSessionNotifier {
(&mut AutoSessionNotifier::Direct(ref mut direct), AutoId(AutoIdInternal::Direct(signal))) => {
direct.unregister(signal)
}
// this pattern is needed when the logind backend is activated
_ => unreachable!()
}
}