Change uses of never type

This commit is contained in:
Christiaan Dirkx
2021-04-14 03:19:01 +02:00
parent 389fef3b30
commit d45e1314f3
15 changed files with 198 additions and 196 deletions

View File

@@ -98,17 +98,17 @@ pub struct ExitStatus(!);
impl ExitStatus {
pub fn success(&self) -> bool {
match self.0 {}
self.0
}
pub fn code(&self) -> Option<i32> {
match self.0 {}
self.0
}
}
impl Clone for ExitStatus {
fn clone(&self) -> ExitStatus {
match self.0 {}
self.0
}
}
@@ -116,7 +116,7 @@ impl Copy for ExitStatus {}
impl PartialEq for ExitStatus {
fn eq(&self, _other: &ExitStatus) -> bool {
match self.0 {}
self.0
}
}
@@ -124,13 +124,13 @@ impl Eq for ExitStatus {}
impl fmt::Debug for ExitStatus {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.0 {}
self.0
}
}
impl fmt::Display for ExitStatus {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self.0 {}
self.0
}
}
@@ -150,19 +150,19 @@ pub struct Process(!);
impl Process {
pub fn id(&self) -> u32 {
match self.0 {}
self.0
}
pub fn kill(&mut self) -> io::Result<()> {
match self.0 {}
self.0
}
pub fn wait(&mut self) -> io::Result<ExitStatus> {
match self.0 {}
self.0
}
pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
match self.0 {}
self.0
}
}