Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: exercise evaluation #271

Merged
merged 1 commit into from
Feb 26, 2020
Merged

refactor: exercise evaluation #271

merged 1 commit into from
Feb 26, 2020

Conversation

jrvidal
Copy link
Contributor

@jrvidal jrvidal commented Feb 20, 2020

After working a bit on #270, I realized that it'd be useful to first perform a minor refactor of exercise evaluation.

  • Now we have standard methods to compile + execute that return Results.
  • Success/failure messages are standardized.

pub stderr: String,
}

impl Drop for FileHandle {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a silly trick to avoid calling clean() all over the place. I think it's not racier than what we were doing before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

src/verify.rs Outdated Show resolved Hide resolved
Exercise evaluation (compilation + execution) now uses Results
Success/failure messages are standardized
Copy link
Member

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! I'm pushing out a minor release tonight, and I'll land this after if there's nothing more from your side.

pub stderr: String,
}

impl Drop for FileHandle {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jrvidal
Copy link
Contributor Author

jrvidal commented Feb 26, 2020

Awesome. I do have the mode="output" code ready, I'll submit after this one.

@shadows-withal
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 26, 2020

📌 Commit 43dc311 has been approved by fmoko

@bors
Copy link
Contributor

bors commented Feb 26, 2020

⌛ Testing commit 43dc311 with merge 7e8530b...

@bors
Copy link
Contributor

bors commented Feb 26, 2020

☀️ Test successful - checks-travis
Approved by: fmoko
Pushing 7e8530b to master...

@bors bors merged commit 7e8530b into rust-lang:master Feb 26, 2020
@jrvidal jrvidal deleted the refactor branch February 26, 2020 13:51
pedantic79 pushed a commit to pedantic79/rustlings that referenced this pull request Apr 11, 2020
refactor: exercise evaluation

After working a bit on rust-lang#270, I realized that it'd be useful to first perform a minor refactor of exercise evaluation.

* Now we have standard methods to compile + execute that return `Result`s.
* Success/failure messages are standardized.
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
refactor: exercise evaluation

After working a bit on rust-lang#270, I realized that it'd be useful to first perform a minor refactor of exercise evaluation.

* Now we have standard methods to compile + execute that return `Result`s.
* Success/failure messages are standardized.
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
refactor: exercise evaluation

After working a bit on rust-lang#270, I realized that it'd be useful to first perform a minor refactor of exercise evaluation.

* Now we have standard methods to compile + execute that return `Result`s.
* Success/failure messages are standardized.
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.

None yet

3 participants