Skip to content

Conversation

@hinto-janai
Copy link
Contributor

This adds some functions that exposes the inner data.

Since the inner Cow is Cow::Owned, into_owned() should be a cheap no-clone/no-allocation call.

Also, most libraries seem use bytes() or as_bytes() instead of data() but that'll break everyone's code, so, maybe not worth it.

Copy link
Owner

@Serial-ATA Serial-ATA left a comment

Choose a reason for hiding this comment

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

Thanks! The reason I chose data() instead of as_bytes() is Picture represents more than just the image file. That's why there are as_{ape, apic, flac}_bytes() methods.

@hinto-janai
Copy link
Contributor Author

Ah, I see.

Requested changes were made.

@hinto-janai hinto-janai changed the title picture: add Vec methods picture: add into_data() Mar 24, 2023
@Serial-ATA
Copy link
Owner

Thanks!

@Serial-ATA Serial-ATA merged commit 8a389c4 into Serial-ATA:main Mar 24, 2023
hinto-janai added a commit to hinto-janai/festival that referenced this pull request Mar 24, 2023
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.

2 participants