Skip to content

Instantly share code, notes, and snippets.

@archer884
Forked from huonw/blackmagic.rs
Created August 19, 2016 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save archer884/8c135b5aef0caf857db9474615b8f770 to your computer and use it in GitHub Desktop.
Save archer884/8c135b5aef0caf857db9474615b8f770 to your computer and use it in GitHub Desktop.
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
@archer884
Copy link
Author

Totally keeping this for reference. Interesting note: the {} at the end seems optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment