Skip to content

forth: Prepare for 2018 by not using Term and using ? not try!#779

Merged
petertseng merged 2 commits intoexercism:masterfrom
petertseng:forth
Dec 17, 2018
Merged

forth: Prepare for 2018 by not using Term and using ? not try!#779
petertseng merged 2 commits intoexercism:masterfrom
petertseng:forth

Conversation

@petertseng
Copy link
Copy Markdown
Member

Prep for #769 .

Blocking #769 and all other otherwise-active maintainers declared inactivity, so I'm merging when tests pass.

I prefer to make it easier to see where `term` is being used.

Also, this causes an error in Rust 2018:

    error[E0658]: imports can only refer to extern crate names passed with `--extern` on stable channel (see issue #53130)
      --> src/lib.rs:5:5
       |
    5  |   use Term::*;
       |       ^^^^

Of course there are probably other ways to fix that, but not something I
want to do right now.
Would cause an error in Rust 2018:

    error: expected expression, found reserved keyword `try`
      --> src/lib.rs:72:13
       |
    72 |             try!(self.step_term(term))
       |             ^^^ expected expression
@petertseng petertseng merged commit ad5ff14 into exercism:master Dec 17, 2018
@petertseng petertseng deleted the forth branch December 17, 2018 02:47
@petertseng
Copy link
Copy Markdown
Member Author

I understand that I could have just done use crate::Term instead (as instructed by https://rust-lang-nursery.github.io/edition-guide/rust-2018/module-system/path-clarity.html), but I wasn't happy enough with the readability/clarity tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant