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

Add to_vec function for writing PNG data to a Vec<u8>. #68

Merged
merged 2 commits into from Apr 29, 2015

Conversation

@jgraham
Copy link
Contributor

jgraham commented Apr 28, 2015

This mostly copies the implementation of store_png, and could
probably be refactored to share more code in the future.

@metajack
Copy link
Contributor

metajack commented Apr 28, 2015

Can you add a test for this? I figured it would call to_vec and then verify the first bytes were the PNG magic bytes and that the total length was the expected one.

Otherwise, looks fine.

This mostly copies the implementation of store_png, and could
probably be refactored to share more code in the future.
@jgraham jgraham force-pushed the jgraham:to_vec branch from 373c019 to d907a09 Apr 28, 2015
@jgraham
Copy link
Contributor Author

jgraham commented Apr 28, 2015

This is rebased onto master, but with the tests in a separate commit, because they won't trivially backport to the current servo branch (but the actual functionality will).

@metajack
Copy link
Contributor

metajack commented Apr 29, 2015

Squash and r=me.

@metajack
Copy link
Contributor

metajack commented Apr 29, 2015

Or are you saying you want to leave the tests in their own commit? If so, maybe change the commit message to not have fixup! in it?

@jgraham
Copy link
Contributor Author

jgraham commented Apr 29, 2015

I'm happy to squash, but unless the rust upgrade is about to land it would be useful to create a servo branch with 16a9dba cherry-picked on top of the current servo commit.

@metajack
Copy link
Contributor

metajack commented Apr 29, 2015

Seems reasonable then. Just change the commit message to 'Add tests for to_vec.' and I'll merge this.

@jgraham jgraham force-pushed the jgraham:to_vec branch from d907a09 to e3235f8 Apr 29, 2015
metajack added a commit that referenced this pull request Apr 29, 2015
Add to_vec function for writing PNG data to a Vec<u8>.
@metajack metajack merged commit 06ec44b into servo:master Apr 29, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.