Skip to content

Commit e1c5e82

Browse files
committed
remove unstable feature on low version of rust
Signed-off-by: Ping Yu <[email protected]>
1 parent 72f8a0b commit e1c5e82

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/raw/client.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,19 @@ impl<PdC: PdClient> Client<PdC> {
744744
}
745745

746746
fn assert_non_atomic(&self) -> Result<()> {
747-
(!self.atomic).then_some(()).ok_or(Error::UnsupportedMode)
747+
if !self.atomic {
748+
Ok(())
749+
} else {
750+
Err(Error::UnsupportedMode)
751+
}
748752
}
749753

750754
fn assert_atomic(&self) -> Result<()> {
751-
self.atomic.then_some(()).ok_or(Error::UnsupportedMode)
755+
if self.atomic {
756+
Ok(())
757+
} else {
758+
Err(Error::UnsupportedMode)
759+
}
752760
}
753761
}
754762

0 commit comments

Comments
 (0)