From 3904855988943db5dc75ff4f862cada769183bf3 Mon Sep 17 00:00:00 2001 From: Michael Macias Date: Mon, 13 Jan 2025 10:44:19 -0600 Subject: [PATCH] gff/record_buf/attributes: Remove DerefMut Use the `AsMut>` implementation instead. --- noodles-gff/CHANGELOG.md | 4 ++++ noodles-gff/src/record_buf/attributes.rs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/noodles-gff/CHANGELOG.md b/noodles-gff/CHANGELOG.md index 57168b491..9044e7102 100644 --- a/noodles-gff/CHANGELOG.md +++ b/noodles-gff/CHANGELOG.md @@ -8,6 +8,10 @@ ### Removed + * gff/record_buf/attributes: Remove `DerefMut`. + + Use the `AsMut>` implementation instead. + * gff/record_buf/attributes: Remove parser. Use a deserializer (e.g., `gff::io::Reader`) instead. diff --git a/noodles-gff/src/record_buf/attributes.rs b/noodles-gff/src/record_buf/attributes.rs index c24f87ce7..8654a4f1d 100644 --- a/noodles-gff/src/record_buf/attributes.rs +++ b/noodles-gff/src/record_buf/attributes.rs @@ -2,7 +2,7 @@ pub mod field; -use std::ops::{Deref, DerefMut}; +use std::ops::Deref; use indexmap::IndexMap; @@ -23,8 +23,8 @@ impl Deref for Attributes { } } -impl DerefMut for Attributes { - fn deref_mut(&mut self) -> &mut Self::Target { +impl AsMut> for Attributes { + fn as_mut(&mut self) -> &mut IndexMap { &mut self.0 } }