From d8dd8812dec7afa3a3325bcfc15d9d28df49531e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= Date: Sat, 12 Aug 2023 21:07:05 +0200 Subject: [PATCH] Fix docs test of normalize_id --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 14b9fe1..8a7fbc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,7 +46,9 @@ impl FromStr for WebiconFamily { /// # Examples /// /// ```rust -/// assert_eq!("1f600", webicons::normalize_id("grinning", WebiconFamily::from("emojis"))); +/// use webicons::{normalize_id, WebiconFamily}; +/// +/// assert_eq!("1f600", normalize_id("grinning", WebiconFamily::Emojis)); /// ``` pub fn normalize_id(id: &str, family: WebiconFamily) -> String { if family == WebiconFamily::Emojis && !unic_emoji_char::is_emoji(str_to_char(&id)) {