From 0bdaade295307c614fa1056afcba5a85a77d502d Mon Sep 17 00:00:00 2001 From: Peter Tseng Date: Tue, 8 Mar 2016 08:33:21 -0800 Subject: [PATCH] rna-transcription: Remove as_ref test This was introduced in 7877d6389ed47d8c3e6631274c1c66a0b4c4ec54 back when the exercises was ported to xrust, but there's no clear reason why we would want the RNA to be convertible to a string. * It's not relevant to the problem statement. * There's no clear use case for why this is something that should be required. * Other languages don't do this. * Other exercises in xrust don't do this. Given these reasons, it makes more sense to remove it. Closes #76 --- exercises/rna-transcription/example.rs | 6 ------ exercises/rna-transcription/tests/rna-transcription.rs | 7 ------- 2 files changed, 13 deletions(-) diff --git a/exercises/rna-transcription/example.rs b/exercises/rna-transcription/example.rs index 26c558294..26e4ff0dd 100644 --- a/exercises/rna-transcription/example.rs +++ b/exercises/rna-transcription/example.rs @@ -11,12 +11,6 @@ impl RibonucleicAcid { } } -impl AsRef for RibonucleicAcid { - fn as_ref(&self) -> &str { - self.nucleotides.as_ref() - } -} - #[derive(PartialEq, Eq, Debug)] pub struct DeoxyribonucleicAcid { nucleotides: String diff --git a/exercises/rna-transcription/tests/rna-transcription.rs b/exercises/rna-transcription/tests/rna-transcription.rs index 559222bb4..99be89f46 100644 --- a/exercises/rna-transcription/tests/rna-transcription.rs +++ b/exercises/rna-transcription/tests/rna-transcription.rs @@ -35,10 +35,3 @@ fn test_transcribes_thymine_to_adenine() { fn test_transcribes_all_dna_to_rna() { assert_eq!(dna::RibonucleicAcid::new("UGCACCAGAAUU"), dna::DeoxyribonucleicAcid::new("ACGTGGTCTTAA").to_rna()) } - -#[test] -#[ignore] -fn test_acid_converts_to_string() { - assert_eq!(dna::RibonucleicAcid::new("AGC").as_ref(), "AGC"); - assert_eq!(dna::RibonucleicAcid::new("CGA").as_ref(), "CGA"); -}