File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 191d16265be6b9db3d48ef87944b7d42b5dffe0d
2
+ refs/heads/master: 4edb88112409c111790dacacb06c22de2ef8da06
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5
5
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
Original file line number Diff line number Diff line change 2
2
3
3
# Introduction
4
4
5
- Functions are the primary tool that programmers can use to build
6
- abstractions. Sometimes, though , programmers want to abstract over
7
- compile-time, syntactic structures rather than runtime values . For example,
8
- the following two code fragments both pattern-match on their input and return
9
- early in one case, doing nothing otherwise:
5
+ Functions are the primary tool that programmers can use to build abstractions.
6
+ Sometimes, however , programmers want to perform abstractions over things that are not
7
+ runtime values. Macros provide a syntactic abstraction . For an example of how this
8
+ can be useful, consider the following two code fragments, which both pattern-match
9
+ on their input and return early in one case, and do nothing otherwise:
10
10
11
11
~~~~
12
12
# enum t { special_a(uint), special_b(uint) };
Original file line number Diff line number Diff line change @@ -1387,8 +1387,7 @@ mod test {
1387
1387
let sock = result::unwrap(move connect_result);
1388
1388
1389
1389
// This is what we are actually testing!
1390
- assert net::ip::format_addr(&sock.get_peer_addr()) ==
1391
- ~" 127 . 0 . 0 . 1 ";
1390
+ assert net::ip::format_addr(&sock.get_peer_addr()) == ~" 127 . 0 . 0 . 1 ";
1392
1391
assert net :: ip:: get_port( & sock. get_peer_addr ( ) ) == 8887 ;
1393
1392
1394
1393
// Fulfill the protocol the test server expects
Original file line number Diff line number Diff line change @@ -1484,7 +1484,7 @@ pub mod test {
1484
1484
fn impl_uv_tcp_server_and_request( ) unsafe {
1485
1485
let bind_ip = ~"0 . 0 . 0 . 0 ";
1486
1486
let request_ip = ~"127 . 0 . 0 . 1 ";
1487
- let port = 8886 ;
1487
+ let port = 8887 ;
1488
1488
let kill_server_msg = ~"does a dog have buddha nature?";
1489
1489
let server_resp_msg = ~"mu!";
1490
1490
let client_port = core:: comm:: Port :: <~str >( ) ;
You can’t perform that action at this time.
0 commit comments