Skip to content

Support parsing kit files #7

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

struthiocamelus
Copy link

Changes

  • Support parsing kit files
  • Minor change to SongMemory for consistency: I'm using TryFrom in the kit, so I want SongMemory to support TryFrom as well. Deprecated the existing from_bytes. Bonus is that now it's a trait and not just a function.

@struthiocamelus
Copy link
Author

snap.kit is a kit with one sample - a recorded sound of me snapping.

I hereby dedicate it to the public domain 😄

@struthiocamelus
Copy link
Author

I figure I ought to write a little more about the TryFrom vs. bare impl helper -

What you gain with implementing TryFrom is:

  • Idiomaticity - TryFrom is a known pattern and its function can be assumed.
  • Portability - That these structs have TryFrom impls means that someone needs no knowledge of the underlying struct to accept something that can TryFrom<[u8]>. Shared idiomatic traits comes in very helpful when pulling two disparate packages together.

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.

1 participant