Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove accept, request, and borrow versions #20

Merged
merged 2 commits into from
Jul 28, 2015

Conversation

Munksgaard
Copy link
Owner

These functions aren't used any more, confuse users and clutter the
namespace.

All occurences of code like

let (tx, rx) = channel();
let t1 = spawn(move || srv(accept(tx).unwrap()));
let t2 = spawn(move || cli(request(rx).unwrap()));

can be replaced by the shorter and nicer

let (c1, c2) = session_channel();
let t1 = spawn(move || srv(c1));
let t2 = spawn(move || cli(c2));

For the tests to still pass, we need to remove the issue-8 compile-fail
test, which tested against a soundness bug in request.

These functions aren't used any more, confuse users and clutter the
namespace.

All occurences of code like

```rust
let (tx, rx) = channel();
let t1 = spawn(move || srv(accept(tx).unwrap()));
let t2 = spawn(move || cli(request(rx).unwrap()));
```

can be replaced by the shorter and nicer

```rust
let (c1, c2) = session_channel();
let t1 = spawn(move || srv(c1));
let t2 = spawn(move || cli(c2));
```

For the tests to still pass, we need to remove the issue-8 compile-fail
test, which tested against a soundness bug in request.
@Munksgaard
Copy link
Owner Author

This fails because the compile-fail directory does not exist when empty. I'll add a basic compile-fail test.

@Munksgaard
Copy link
Owner Author

We could use more of those anyway, to showcase what our library does.

@Munksgaard
Copy link
Owner Author

#21 will try to add some more tests.

@Munksgaard
Copy link
Owner Author

@laumann: r?

@laumann
Copy link
Collaborator

laumann commented Jul 28, 2015

r+

Munksgaard added a commit that referenced this pull request Jul 28, 2015
Remove accept, request, and borrow versions
@Munksgaard Munksgaard merged commit 9170da9 into master Jul 28, 2015
@Munksgaard Munksgaard deleted the remove-accept-and-request branch July 28, 2015 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants