Skip to content

Commit

Permalink
Implement AsRef for DnaSequence
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed Jan 31, 2024
1 parent 7303a94 commit 49eec23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rust_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ impl<T: NucleotideLike> FromStr for DnaSequence<T> {
}
}

impl<T: NucleotideLike> AsRef<[T]> for DnaSequence<T> {
fn as_ref(&self) -> &[T] {
self.as_slice()
}
}

impl DnaSequence<Nucleotide> {
/// Return canonical isomorphic DNA sequence.
///
Expand Down

0 comments on commit 49eec23

Please sign in to comment.