Change calls of proto! to use parens.
This commit is contained in:
parent
c74a442e86
commit
77e83d83a9
16 changed files with 42 additions and 42 deletions
|
|
@ -2,11 +2,11 @@
|
|||
//
|
||||
// xfail-test
|
||||
|
||||
proto! streamp {
|
||||
proto! streamp (
|
||||
open:send<T: send> {
|
||||
data(T) -> open<T>
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn rendezvous() {
|
||||
let (c, s) = streamp::init();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
proto! stream {
|
||||
proto! stream (
|
||||
stream:send<T:send> {
|
||||
send(T) -> stream<T>
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn main() {
|
||||
let (bc, _bp) = stream::init();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ type password = ~str;
|
|||
type money = float;
|
||||
type amount = float;
|
||||
|
||||
proto! bank {
|
||||
proto! bank (
|
||||
login:send {
|
||||
login(username, password) -> login_response
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ proto! bank {
|
|||
money(money) -> connected,
|
||||
insufficient_funds -> connected
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
macro_rules! move_it (
|
||||
{ $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ import std::uv;
|
|||
|
||||
import pipes::{try_recv, recv};
|
||||
|
||||
proto! oneshot {
|
||||
proto! oneshot (
|
||||
waiting:send {
|
||||
signal -> !
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn main() {
|
||||
let iotask = uv::global_loop::get();
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ use std;
|
|||
import std::timer::sleep;
|
||||
import std::uv;
|
||||
|
||||
proto! oneshot {
|
||||
proto! oneshot (
|
||||
waiting:send {
|
||||
signal -> !
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn main() {
|
||||
let (c, p) = oneshot::init();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// xfail-pretty
|
||||
|
||||
proto! pingpong {
|
||||
proto! pingpong (
|
||||
ping:send {
|
||||
ping -> pong
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ proto! pingpong {
|
|||
pong:recv {
|
||||
pong -> ping
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
mod test {
|
||||
import pipes::recv;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ struct Buffer {
|
|||
drop { }
|
||||
}
|
||||
|
||||
proto! double_buffer {
|
||||
proto! double_buffer (
|
||||
acquire:send {
|
||||
request -> wait_buffer
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ proto! double_buffer {
|
|||
release:send {
|
||||
release(Buffer) -> acquire
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// Code examples
|
||||
fn render(_buffer: &Buffer) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
// xfail-pretty
|
||||
|
||||
// Protocols
|
||||
proto! foo {
|
||||
proto! foo (
|
||||
foo:recv {
|
||||
do_foo -> foo
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
proto! bar {
|
||||
proto! bar (
|
||||
bar:recv {
|
||||
do_bar(int) -> barbar,
|
||||
do_baz(bool) -> bazbar,
|
||||
|
|
@ -20,7 +20,7 @@ proto! bar {
|
|||
bazbar:send {
|
||||
rebazbar -> bar
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn macros() {
|
||||
include!("select-macro.rs");
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@ import std::uv;
|
|||
|
||||
import pipes::{recv, select};
|
||||
|
||||
proto! oneshot {
|
||||
proto! oneshot (
|
||||
waiting:send {
|
||||
signal -> !
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
proto! stream {
|
||||
proto! stream (
|
||||
stream:send<T:send> {
|
||||
send(T) -> stream<T>
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn main() {
|
||||
import oneshot::client::*;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ import std::timer::sleep;
|
|||
import std::uv;
|
||||
import pipes::recv;
|
||||
|
||||
proto! oneshot {
|
||||
proto! oneshot (
|
||||
waiting:send {
|
||||
signal -> !
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
fn main() {
|
||||
import oneshot::client::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue