Skip to content

Commit 083c692

Browse files
author
Eric Reed
committed
Changed visibility from being on the impl to being on methods per language syntax change.
1 parent d777ba0 commit 083c692

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/libstd/rt/uv/net.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use rt::uv::{Loop, Watcher, Request, UvError, Buf, NativeHandle, NullCallback,
1717
status_to_maybe_uv_error};
1818
use rt::io::net::ip::{IpAddr, Ipv4, Ipv6};
1919
use rt::uv::last_uv_error;
20+
use vec;
2021

2122
fn ip4_as_uv_ip4<T>(addr: IpAddr, f: &fn(*sockaddr_in) -> T) -> T {
2223
match addr {
@@ -161,7 +162,7 @@ pub struct TcpWatcher(*uvll::uv_tcp_t);
161162
impl Watcher for TcpWatcher { }
162163

163164
impl TcpWatcher {
164-
pub fn new(loop_: &mut Loop) -> TcpWatcher {
165+
pub fn new(loop_: &Loop) -> TcpWatcher {
165166
unsafe {
166167
let handle = malloc_handle(UV_TCP);
167168
assert!(handle.is_not_null());
@@ -264,8 +265,8 @@ impl NativeHandle<*uvll::uv_tcp_t> for TcpWatcher {
264265
pub struct UdpWatcher(*uvll::uv_udp_t);
265266
impl Watcher for UdpWatcher { }
266267

267-
pub impl UdpWatcher {
268-
fn new(loop_: &mut Loop) -> UdpWatcher {
268+
impl UdpWatcher {
269+
pub fn new(loop_: &mut Loop) -> UdpWatcher {
269270
unsafe {
270271
let handle = malloc_handle(UV_UDP);
271272
assert!(handle.is_not_null());
@@ -276,7 +277,7 @@ pub impl UdpWatcher {
276277
}
277278
}
278279

279-
fn bind(&mut self, address: IpAddr) -> Result<(), UvError> {
280+
pub fn bind(&mut self, address: IpAddr) -> Result<(), UvError> {
280281
match address {
281282
Ipv4(*) => {
282283
do ip4_as_uv_ip4(address) |addr| {
@@ -294,7 +295,7 @@ pub impl UdpWatcher {
294295
}
295296
}
296297

297-
fn recv_start(&mut self, alloc: AllocCallback, cb: UdpReceiveCallback) {
298+
pub fn recv_start(&mut self, alloc: AllocCallback, cb: UdpReceiveCallback) {
298299
{
299300
let data = self.get_watcher_data();
300301
data.alloc_cb = Some(alloc);
@@ -325,12 +326,12 @@ pub impl UdpWatcher {
325326
}
326327
}
327328

328-
fn recv_stop(&mut self) {
329+
pub fn recv_stop(&mut self) {
329330
let handle = self.native_handle();
330331
unsafe { uvll::udp_recv_stop(handle); }
331332
}
332333

333-
fn send(&mut self, buf: Buf, address: IpAddr, cb: UdpSendCallback) {
334+
pub fn send(&mut self, buf: Buf, address: IpAddr, cb: UdpSendCallback) {
334335
{
335336
let data = self.get_watcher_data();
336337
assert!(data.udp_send_cb.is_none());
@@ -366,7 +367,7 @@ pub impl UdpWatcher {
366367
}
367368
}
368369

369-
fn close(self, cb: NullCallback) {
370+
pub fn close(self, cb: NullCallback) {
370371
{
371372
let mut this = self;
372373
let data = this.get_watcher_data();
@@ -470,11 +471,10 @@ impl NativeHandle<*uvll::uv_write_t> for WriteRequest {
470471
}
471472

472473
pub struct UdpSendRequest(*uvll::uv_udp_send_t);
473-
474474
impl Request for UdpSendRequest { }
475475

476-
pub impl UdpSendRequest {
477-
fn new() -> UdpSendRequest {
476+
impl UdpSendRequest {
477+
pub fn new() -> UdpSendRequest {
478478
let send_handle = unsafe {
479479
malloc_req(UV_UDP_SEND)
480480
};
@@ -483,14 +483,14 @@ pub impl UdpSendRequest {
483483
UdpSendRequest(send_handle)
484484
}
485485

486-
fn handle(&self) -> UdpWatcher {
486+
pub fn handle(&self) -> UdpWatcher {
487487
unsafe {
488488
let udp_handle = uvll::get_udp_handle_from_send_req(self.native_handle());
489489
NativeHandle::from_native_handle(udp_handle)
490490
}
491491
}
492492

493-
fn delete(self) {
493+
pub fn delete(self) {
494494
unsafe { free_req(self.native_handle() as *c_void) }
495495
}
496496
}

0 commit comments

Comments
 (0)