removed unecessary method
This commit is contained in:
parent
34b1135b59
commit
d0dc6970d8
1 changed files with 1 additions and 3 deletions
|
|
@ -19,12 +19,10 @@ use rt::local::Local;
|
|||
pub struct UdpSocket(~RtioUdpSocketObject);
|
||||
|
||||
impl UdpSocket {
|
||||
fn new(s: ~RtioUdpSocketObject) -> UdpSocket { UdpSocket(s) }
|
||||
|
||||
pub fn bind(addr: IpAddr) -> Option<UdpSocket> {
|
||||
let socket = unsafe { (*Local::unsafe_borrow::<IoFactoryObject>()).udp_bind(addr) };
|
||||
match socket {
|
||||
Ok(s) => Some(UdpSocket::new(s)),
|
||||
Ok(s) => Some(UdpSocket(s)),
|
||||
Err(ioerr) => {
|
||||
io_error::cond.raise(ioerr);
|
||||
None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue