What's the easiest way to read several ints from stdin if it's ok to fail?
<p>Suppose I expect a line with 3 integers from stdin. What's the easiest way to read and parse them? What's the Rust equivalent of <code>a, b, c = map(int, input().split())</code> in Python or <code>scanf("%d %d %d", &amp;a, &amp;b, &amp;c);</code> in C?</p>

<p>The best way I came up with was something like:</p>

<pre><code>let mut line = String::new();
io::stdin().read_line(&amp;mut line).unwrap();
let parts: Vec&lt;&amp;str&gt; = line.split_whitespace().collect();
let a: i32 = parts[0].parse().unwrap();
let b: i32 = parts[1].parse().unwrap();
let c: i32 = parts[2].parse().unwrap();
</code></pre>

<p>Is there a simpler way?</p>