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

Support for Card and Keyword iteration on header #12

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

chrsoo
Copy link
Contributor

@chrsoo chrsoo commented Dec 28, 2024

This PR relates to the question raised in Issue #9 and provides support for the following:

  • Iterate over all Cards and Keywords defined for a Header.
  • Retrieve the Keyword of a Card as a trimmed and owned String.

Note 1: I did not create test cases for the Card and Keyword iterators due to the issue related to git-lfs reported in issue #10. On the other hand, this change is trivial and was tested locally from another project.

Note 2: Retrieving the Keyword as a trimmed and owned String can be considered syntactic sugar, but it scratches the itch of having to work with byte arrays for Strings...

@bmatthieu3
Copy link
Collaborator

bmatthieu3 commented Jan 6, 2025

Hi @chrsoo,

I added a test retrieving calling cards iter. I realize Keyword may not be very friendly. Would it be better to have a proper Keyword type being just a [u8; 8] that has a method to get its owned String trimmed value (the method you made on Card) ?

@bmatthieu3 bmatthieu3 merged commit 8e4040c into cds-astro:master Jan 6, 2025
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