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

Add shorter swap syntax for Rust #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions markup/rust
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ i = 3;||var i = 0 _
i = 3|| ||
||[[# parallel-assignment]][#parallel-assignment-note parallel assignment]||##gray|@@//@@ only in variable definition:## _
let (m, n) = (3, 7);||var (m, n) = (3, 7)|| val (m, n) = (3, 7) ||
||[[# swap]][#swap-note swap]||let tmp; _
tmp = x; _
x = y; _
y = tmp;||(x, y) = (y, x)|| ||
||[[# swap]][#swap-note swap]||let (x, y) = (y, x);||(x, y) = (y, x)|| ||
||[[# compound-assignment]][#compound-assignment-note compound assignment]||##gray|//arithmetic://## _
+= -= *= /= %= _
_
Expand Down Expand Up @@ -2020,4 +2017,4 @@ As of June 2014, to use Swift one must download and install a beta version of Xc
$ sudo xcode-select -s /Applications/Xcode6-Beta.app/Contents/Developer/

$ xcrun swift
[[/code]]
[[/code]]