From 49eec236ef01aa2489b72ad23a03cd8a90911768 Mon Sep 17 00:00:00 2001 From: Lynn Date: Wed, 31 Jan 2024 16:37:45 +0100 Subject: [PATCH] Implement AsRef for DnaSequence --- src/rust_api.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rust_api.rs b/src/rust_api.rs index f52f217..3de1555 100644 --- a/src/rust_api.rs +++ b/src/rust_api.rs @@ -337,6 +337,12 @@ impl FromStr for DnaSequence { } } +impl AsRef<[T]> for DnaSequence { + fn as_ref(&self) -> &[T] { + self.as_slice() + } +} + impl DnaSequence { /// Return canonical isomorphic DNA sequence. ///