Skip to content

Commit 25fad14

Browse files
committed
---
yaml --- r: 42059 b: refs/heads/master c: d9170e1 h: refs/heads/master i: 42057: a854caf 42055: 80ec33e v: v3
1 parent 9dd8430 commit 25fad14

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d38939c7e8ca67a3991949cb17bf052b840d1aa4
2+
refs/heads/master: d9170e14b1c1c56f37821e96d4d24d5687dc3374
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/src/libstd/net_tcp.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,9 @@ fn listen_common(host_ip: ip::IpAddr, port: uint, backlog: uint,
809809
* A buffered wrapper that you can cast as an `io::reader` or `io::writer`
810810
*/
811811
pub fn socket_buf(sock: TcpSocket) -> TcpSocketBuf {
812-
TcpSocketBuf(@TcpBufferedSocketData { sock: move sock, mut buf: ~[], buf_off: 0 })
812+
TcpSocketBuf(@TcpBufferedSocketData {
813+
sock: move sock, mut buf: ~[], buf_off: 0
814+
})
813815
}
814816

815817
/// Convenience methods extending `net::tcp::tcp_socket`
@@ -865,19 +867,19 @@ impl TcpSocketBuf: io::Reader {
865867
loop {
866868
assert count < len;
867869

868-
// If possible, copy up to `len` bytes from the internal
870+
// If possible, copy up to `len` bytes from the internal
869871
// `data.buf` into `buf`
870872
let nbuffered = self.data.buf.len() - self.data.buf_off;
871873
let needed = len - count;
872874
if nbuffered > 0 {
873875
unsafe {
874-
let ncopy = uint::min(nbuffered, needed);
876+
let ncopy = uint::min(nbuffered, needed);
875877
let dst = ptr::mut_offset(
876878
vec::raw::to_mut_ptr(buf), count);
877879
let src = ptr::const_offset(
878880
vec::raw::to_const_ptr(self.data.buf),
879881
self.data.buf_off);
880-
ptr::copy_memory(dst, src, ncopy);
882+
ptr::copy_memory(dst, src, ncopy);
881883
self.data.buf_off += ncopy;
882884
count += ncopy;
883885
}
@@ -905,7 +907,7 @@ impl TcpSocketBuf: io::Reader {
905907
err_data.err_name, err_data.err_msg);
906908
// As we have already copied data into result buffer,
907909
// we cannot simply return 0 here. Instead the error
908-
// should show up in a later call to read().
910+
// should show up in a later call to read().
909911
break;
910912
}
911913
}
@@ -1872,7 +1874,8 @@ pub mod test {
18721874
cont_ch.send(());
18731875
let sock = result::unwrap(move accept_result);
18741876
let peer_addr = sock.get_peer_addr();
1875-
debug!("SERVER: successfully accepted connection from %s:%u",
1877+
debug!("SERVER: successfully accepted \
1878+
connection from %s:%u",
18761879
ip::format_addr(&peer_addr),
18771880
ip::get_port(&peer_addr));
18781881
let received_req_bytes = read(&sock, 0u);

0 commit comments

Comments
 (0)