Skip to content

Commit

Permalink
Fix already-solved lifetime challenge in anagram (#1847)
Browse files Browse the repository at this point in the history
This is basically a revert of #1755.

The original "fix" was a reaction to this forum post:
https://forum.exercism.org/t/the-function-signature-for-anagrams-in-rust-is-missing-a-lifetime/7677

It seems the exercise instructions, which explicitly mention that this
missing lifetime annotation is intentional, went unnoticed.
  • Loading branch information
senekor authored Jan 5, 2024
1 parent f03997c commit 3c51a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/anagram/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::collections::HashSet;

pub fn anagrams_for<'a>(word: &str, possible_anagrams: &[&'a str]) -> HashSet<&'a str> {
pub fn anagrams_for<'a>(word: &str, possible_anagrams: &[&str]) -> HashSet<&'a str> {
todo!("For the '{word}' word find anagrams among the following words: {possible_anagrams:?}");
}

0 comments on commit 3c51a29

Please sign in to comment.