diff options
| author | Christiaan Dirkx <christiaan@dirkx.email> | 2021-04-14 03:19:01 +0200 |
|---|---|---|
| committer | Christiaan Dirkx <christiaan@dirkx.email> | 2021-04-20 20:53:07 +0200 |
| commit | d45e1314f36ac249e8fb7d9564362ac8f94e49be (patch) | |
| tree | 25a3341090f572e93a857c4f8566f75168eb8ff5 /library/std/src/sys/wasi | |
| parent | 389fef3b304bd4f196a337797591d9f8db998a62 (diff) | |
| download | rust-d45e1314f36ac249e8fb7d9564362ac8f94e49be.tar.gz rust-d45e1314f36ac249e8fb7d9564362ac8f94e49be.zip | |
Change uses of never type
Diffstat (limited to 'library/std/src/sys/wasi')
| -rw-r--r-- | library/std/src/sys/wasi/net.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/wasi/os.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/wasi/thread.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/library/std/src/sys/wasi/net.rs b/library/std/src/sys/wasi/net.rs index 30c21a05a32..06860673d90 100644 --- a/library/std/src/sys/wasi/net.rs +++ b/library/std/src/sys/wasi/net.rs @@ -347,14 +347,14 @@ pub struct LookupHost(!); impl LookupHost { pub fn port(&self) -> u16 { - match self.0 {} + self.0 } } impl Iterator for LookupHost { type Item = SocketAddr; fn next(&mut self) -> Option<SocketAddr> { - match self.0 {} + self.0 } } diff --git a/library/std/src/sys/wasi/os.rs b/library/std/src/sys/wasi/os.rs index a349c149249..cf17ac0ba5f 100644 --- a/library/std/src/sys/wasi/os.rs +++ b/library/std/src/sys/wasi/os.rs @@ -87,7 +87,7 @@ pub fn chdir(p: &path::Path) -> io::Result<()> { } } -pub struct SplitPaths<'a>(&'a !); +pub struct SplitPaths<'a>(!, PhantomData<&'a ()>); pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> { panic!("unsupported") @@ -96,7 +96,7 @@ pub fn split_paths(_unparsed: &OsStr) -> SplitPaths<'_> { impl<'a> Iterator for SplitPaths<'a> { type Item = PathBuf; fn next(&mut self) -> Option<PathBuf> { - match *self.0 {} + self.0 } } diff --git a/library/std/src/sys/wasi/thread.rs b/library/std/src/sys/wasi/thread.rs index 2efa91f8b70..74515553a82 100644 --- a/library/std/src/sys/wasi/thread.rs +++ b/library/std/src/sys/wasi/thread.rs @@ -59,7 +59,7 @@ impl Thread { } pub fn join(self) { - match self.0 {} + self.0 } } |
