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

Remove unwrap()s from context.rs #26

Merged
merged 7 commits into from
Dec 29, 2018
Merged

Remove unwrap()s from context.rs #26

merged 7 commits into from
Dec 29, 2018

Conversation

alphastrata
Copy link
Contributor

I removed all the ones I could.

cargo test --doc 97 Passes, 2 Ignored, 0 Failing.

Hope it's acceptable.

@bheisler
Copy link
Owner

Thanks for the pull request! It might be a while before I can review this properly.

src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated
//! }
//! CurrentContext::set_current(&contexts[0])?;
//!
//! // Call Rustacuda functions which will use the context
Copy link
Owner

Choose a reason for hiding this comment

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

Rustacuda should be RustaCUDA, as it was before.

Copy link
Owner

@bheisler bheisler Dec 23, 2018

Choose a reason for hiding this comment

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

Also, it looks like the indentation of this example was changed. Was that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I just lifted it from your comment as that one was a little hard for me.

#1 (comment)

src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
src/context.rs Outdated Show resolved Hide resolved
@bheisler
Copy link
Owner

bheisler commented Dec 23, 2018

For the most part this looks good, but there are a bunch of minor things that will need to be cleaned up.

  • There are a number of what appear to be copy-paste errors and other minor things.
  • There is also some trailing whitespace in the examples which is causing the Rustfmt check in the CI builds to fail.
  • In other circumstances, it would make sense to add another level of indentation when wrapping a function around some code, but since the reader of the examples can't see the fn main code, for these examples the indentation shouldn't be changed.

Other comments:

  • I won't be too picky about it, but in future it would be a good idea to remove commits like your test and test2 commits from the history.

@alphastrata
Copy link
Contributor Author

Should I just refork your repo & then submit a new pull request, once I've made those cleanups and possibly others?

@bheisler
Copy link
Owner

No, just push more commits fixing the issues I raised in my review.

You may want to read up on the git rebase command and how it can be used to rewrite the history of a branch, but don't worry about it too much. I can fix it when I do the merge later.

@alphastrata alphastrata deleted the remove-unwraps-context branch December 24, 2018 14:14
@alphastrata alphastrata restored the remove-unwraps-context branch December 24, 2018 14:14
@alphastrata
Copy link
Contributor Author

Whoops, while messing around with git I accidentally closed this.
Sorry.

@alphastrata alphastrata reopened this Dec 25, 2018
@alphastrata
Copy link
Contributor Author

This should be good to go.

If it's acceptable, I'll start working on the other unwrap() calls in device.rs etc ~

@rusch95
Copy link
Contributor

rusch95 commented Dec 26, 2018 via email

@bheisler bheisler merged commit 1f533f1 into bheisler:master Dec 29, 2018
@bheisler
Copy link
Owner

Thanks for the pull request!

@alphastrata alphastrata deleted the remove-unwraps-context branch January 1, 2019 05:08
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.

3 participants