Skip to content

Commit

Permalink
gtf/record/attributes: Actually implement AsRef<[Entry]>
Browse files Browse the repository at this point in the history
This was missed in b12c222.

Fixes #321.
  • Loading branch information
zaeleus committed Jan 24, 2025
1 parent cd7c229 commit d8cf00d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions noodles-gtf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Changelog

## Unreleased

### Fixed

* gtf/record/attributes: Implement `AsRef<[Entry]>` ([#321]).

This was missed in noodles-gtf 0.37.0.

[#321]: https://github.com/zaeleus/noodles/issues/321

## 0.37.0 - 2025-01-23

### Added

* gtf/record/attributes: Add lookup by key (`Attributes::get`) ([#316]).

* gtf/record/attributes: Implement `AsRef<[Entry]>`.

[#316]: https://github.com/zaeleus/noodles/issues/316

### Removed
Expand Down
6 changes: 6 additions & 0 deletions noodles-gtf/src/record/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ impl Attributes {
}
}

impl AsRef<[Entry]> for Attributes {
fn as_ref(&self) -> &[Entry] {
&self.0
}
}

impl From<Vec<Entry>> for Attributes {
fn from(entries: Vec<Entry>) -> Self {
Self(entries)
Expand Down

0 comments on commit d8cf00d

Please sign in to comment.