Fix doc tests

This commit is contained in:
Davide Cavalca 2025-02-20 09:58:55 -08:00 • committed by Paul Delafosse
parent 8c33445d75
commit f96e963809

View file

@ -68,7 +68,7 @@ mod theme;
/// # fn main() { /// # fn main() {
/// use freedesktop_icons::list_themes; /// use freedesktop_icons::list_themes;
/// ///
/// let themes: Vec<&str> = list_themes(); /// let themes: Vec<String> = list_themes();
/// ///
/// assert_eq!(themes, vec![ /// assert_eq!(themes, vec![
/// "Adwaita", "Arc", "Breeze Light", "HighContrast", "Papirus", "Papirus-Dark", /// "Adwaita", "Arc", "Breeze Light", "HighContrast", "Papirus", "Papirus-Dark",
@ -112,7 +112,7 @@ pub fn list_themes() -> Vec<String> {
/// ///
/// let theme = default_theme_gtk(); /// let theme = default_theme_gtk();
/// ///
/// assert_eq!(Some("Adwaita"), theme); /// assert_eq!(Some("Adwaita"), theme.as_deref());
/// ``` /// ```
pub fn default_theme_gtk() -> Option<String> { pub fn default_theme_gtk() -> Option<String> {
// Calling gsettings is the simplest way to retrieve the default icon theme without adding // Calling gsettings is the simplest way to retrieve the default icon theme without adding