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

Added some comments to the saveload example #492

Merged
merged 5 commits into from Oct 17, 2018
Merged

Added some comments to the saveload example #492

merged 5 commits into from Oct 17, 2018

Conversation

Telzhaak
Copy link
Contributor

@Telzhaak Telzhaak commented Oct 14, 2018

I hope they are all correct,
please verify.


This change is Reviewable

Copy link
Member

@torkleyy torkleyy left a comment

Choose a reason for hiding this comment

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

Thank you.

@@ -9,6 +9,10 @@ use specs::error::NoError;
use specs::prelude::*;
use specs::saveload::{DeserializeComponents, MarkedBuilder, SerializeComponents, U64Marker, U64MarkerAllocator};

// This is an example of how the serialized data of two entities might look on disk.
//
// When serializing entities, they are written in an array of unnamed structs, each struct representing one entity.
Copy link
Member

Choose a reason for hiding this comment

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

unnamed structs -> tuples

That's only if you pass a tuple of component storages though. Custom structs are possible, and will be easier with the derive PR.

impl From<ron::ser::Error> for Combined {
fn from(x: ron::ser::Error) -> Self {
Combined::Ron(x)
}
}

// This returns nothing, in case a `NoError` is received.
Copy link
Member

Choose a reason for hiding this comment

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

This cannot be called, thus it cannot return.

Copy link
Member

@torkleyy torkleyy left a comment

Choose a reason for hiding this comment

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

Looks good, rebase needed though.

Copy link
Member

@torkleyy torkleyy left a comment

Choose a reason for hiding this comment

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

Okay, thanks!
Could you do a rebase (instead of a merge commit) next time, please? Merge commits make the master commit logs hard to read.

bors r+

bors bot added a commit that referenced this pull request Oct 17, 2018
492: Added some comments to the saveload example r=torkleyy a=Telzhaak

I hope they are all correct,
please verify.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/slide-rs/specs/492)
<!-- Reviewable:end -->


Co-authored-by: Telzhaak <da.ahrens@outlook.de>
@Telzhaak
Copy link
Contributor Author

I tried, but broke everything locally. So I decided to be save and do it here

@bors
Copy link
Contributor

bors bot commented Oct 17, 2018

Build succeeded

@bors bors bot merged commit 60a9bc3 into amethyst:master Oct 17, 2018
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

2 participants