Skip to content

Commit

Permalink
add as_raw() method to L4Re's Socket mock
Browse files Browse the repository at this point in the history
Minimally comply with with rust-lang#87329 to avoid breaking tests on L4Re.
  • Loading branch information
atopia committed Mar 9, 2022
1 parent cb013d4 commit bc199b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/std/src/sys/unix/l4re.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ pub mod net {
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
unimpl!();
}

// This is used by sys_common code to abstract over Windows and Unix.
pub fn as_raw(&self) -> RawFd {
self.as_raw_fd()
}
}

impl AsInner<FileDesc> for Socket {
Expand Down

0 comments on commit bc199b5

Please sign in to comment.