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

Allow #[must_use] on functions, rather than just types. Mark Result::{ok,err} #[must_use]. #886

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Formatting, mention ignored URLs.
  • Loading branch information
huonw committed Feb 19, 2015
commit 96c62fad39679c9500230d0a8c8fef28b8691f63
17 changes: 12 additions & 5 deletions text/0000-must-use-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,18 @@ grepped for `\.ok` and `let _ =`.
Initially just I scrolled around and clicked things, may 10-15, the
rest were running this JS `var list = $("a");
window.open(list[(Math.random() * list.length) | 0].href, '_blank')`
to open literally random links in a new window. The grepping was
performed by running `runit url`, where `runit` is: ```bash function
runit () { cd ~/tmp; git clone $1; cd $(basename $1); git grep '\.ok'
| wc -l; git grep 'let _ =' | wc -l; } ``` If there were any `ok`s, I
manually read the grep to see if they were used on not.
to open literally random links in a new window. Links that were not
projects (including 404s from deleted projects) and duplicates were
ignored. The grepping was performed by running `runit url`, where
`runit` is the shell function:

```bash
function runit () { cd ~/tmp; git clone $1; cd $(basename $1); git grep '\.ok'
| wc -l; git grep 'let _ =' | wc -l; }
```

If there were any `ok`s, I manually read the grep to see if they were
used on not.

## Data

Expand Down