This feature was removed from the language in
https://github.com/mozilla/rust/pull/12244. The as_slice() method will
continue to work for now.

On Thu, Feb 20, 2014 at 4:53 PM, Michael Dagitses <[email protected]> wrote:
> The following no longer works:
> let file = match std::os::args() {
>   [_prog, f] => f,
>   _ => fail!("usage"),
> };
>
> This works, but is not pretty. Is there a better solution?
> let file = match std::os::args().as_slice() {
>   [ref _prog, ref f] => f.to_owned(),
>   _ => fail!("usage"),
> };
>
> Thanks, and sorry if this is a repeat, I don't see any relevant threads and
> I see this is a very recent change.
> Michael
>
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to