Open
Description
As an example, my solution resulted in the comment "Consider expanding the solution to pass the feature-gated test_grapheme_clusters test case..."
#[cfg(feature = "grapheme")]
use unicode_segmentation::UnicodeSegmentation;
#[cfg(not(feature = "grapheme"))]
pub fn reverse(input: &str) -> String {
input.chars().rev().collect()
}
#[cfg(feature = "grapheme")]
pub fn reverse(input: &str) -> String {
input.graphemes(true).rev().collect()
}
I assume the #[cfg()]
blocks are tripping it up. I'm afraid I don't have a suggestion for fixing this but I'm sure it's an interesting challenge for someone to tackle at some point :)
Metadata
Metadata
Assignees
Labels
No labels