Simplified swap.rs
Merge pull request #39 from aochagavia/pr-3

Simplified swap.rs