File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: a4b1ac5447c44b5ad5923653ed2091e0510ac8db
4
+ refs/heads/snap-stage3: 5f9741e62d7cfe26ca94a28716a95bc03d74e87a
5
5
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
Original file line number Diff line number Diff line change 31
31
(modify-syntax-entry ?\" " \" " table)
32
32
(modify-syntax-entry ?\\ " \\ " table)
33
33
34
- ; ; _ is a word-char
35
- (modify-syntax-entry ?_ " w" table)
36
-
37
34
; ; Comments
38
35
(modify-syntax-entry ?/ " . 124b" table)
39
36
(modify-syntax-entry ?* " . 23" table)
@@ -397,7 +394,7 @@ This is written mainly to be used as `beginning-of-defun-function' for Rust.
397
394
Don't move to the beginning of the line. `beginning-of-defun' ,
398
395
which calls this, does that afterwards."
399
396
(interactive " p" )
400
- (re-search-backward (concat " ^\\ (" rust-top-item-beg-re " \\ )\\ b " )
397
+ (re-search-backward (concat " ^\\ (" rust-top-item-beg-re " \\ )\\ _> " )
401
398
nil 'move (or arg 1 )))
402
399
403
400
(defun rust-end-of-defun ()
Original file line number Diff line number Diff line change @@ -34,18 +34,22 @@ use sys::tcp::TcpAcceptor as TcpAcceptorImp;
34
34
/// A structure which represents a TCP stream between a local socket and a
35
35
/// remote socket.
36
36
///
37
+ /// The socket will be closed when the value is dropped.
38
+ ///
37
39
/// # Example
38
40
///
39
41
/// ```no_run
40
- /// # #![allow(unused_must_use)]
41
42
/// use std::io::TcpStream;
42
43
///
43
- /// let mut stream = TcpStream::connect("127.0.0.1:34254");
44
+ /// {
45
+ /// let mut stream = TcpStream::connect("127.0.0.1:34254");
46
+ ///
47
+ /// // ignore the Result
48
+ /// let _ = stream.write(&[1]);
44
49
///
45
- /// stream.write(&[1]);
46
- /// let mut buf = [0];
47
- /// stream.read(&mut buf);
48
- /// drop(stream); // close the connection
50
+ /// let mut buf = [0];
51
+ /// let _ = stream.read(&mut buf); // ignore here too
52
+ /// } // the stream is closed here
49
53
/// ```
50
54
pub struct TcpStream {
51
55
inner : TcpStreamImp ,
You can’t perform that action at this time.
0 commit comments