Created
July 25, 2016 09:33
-
-
Save anonymous/8521121d0d0c9557ad111f385d81bd2e to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let floats = vec![1.0, 2.0, 3.0]; | |
let s: &[f64] = &floats[..]; | |
let string = s.into_iter().map(ToString::to_string).collect::<Vec<_>>().join(","); | |
println!("{}", string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment