Skip to content

Commit

Permalink
gff/record_buf/attributes: Remove DerefMut
Browse files Browse the repository at this point in the history
Use the `AsMut<IndexMap<Tag, Value>>` implementation instead.
  • Loading branch information
zaeleus committed Jan 13, 2025
1 parent ee423ba commit 3904855
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions noodles-gff/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

### Removed

* gff/record_buf/attributes: Remove `DerefMut`.

Use the `AsMut<IndexMap<Tag, Value>>` implementation instead.

* gff/record_buf/attributes: Remove parser.

Use a deserializer (e.g., `gff::io::Reader`) instead.
Expand Down
6 changes: 3 additions & 3 deletions noodles-gff/src/record_buf/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pub mod field;

use std::ops::{Deref, DerefMut};
use std::ops::Deref;

use indexmap::IndexMap;

Expand All @@ -23,8 +23,8 @@ impl Deref for Attributes {
}
}

impl DerefMut for Attributes {
fn deref_mut(&mut self) -> &mut Self::Target {
impl AsMut<IndexMap<Tag, Value>> for Attributes {
fn as_mut(&mut self) -> &mut IndexMap<Tag, Value> {
&mut self.0
}
}
Expand Down

0 comments on commit 3904855

Please sign in to comment.