async-rs / async-rs/async-std

try_clone not implemented on UdpSocket

Open
#1,095 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

Noticed that `async_std::net::UdpSocket` does not implement `try_clone()` function, which is implemented in standard lib.

Tested out briefly on a local env and it seems to me that something like this would do the trick:
```
pub fn try_clone(&self) -> UdpSocket {
UdpSocket::from(self.watcher.get_ref().try_clone().expect("oops"))
}
```

Is it a good idea to craft a PR, or is there some particular reason why this is not implemented?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.