Skip to content

Commit

Permalink
pango: Manually implement Language::to_string
Browse files Browse the repository at this point in the history
To avoid an API break for 0.16
  • Loading branch information
bilelmoussaoui committed Dec 5, 2022
1 parent c40aa68 commit de6c626
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pango/src/language.rs
Expand Up @@ -41,11 +41,14 @@ impl Language {
Self::from_glib_full_as_vec(ptr)
}
}

pub fn to_string(&self) -> glib::GString {
self.to_str()
}
}

impl FromStr for Language {
type Err = std::convert::Infallible;

fn from_str(language: &str) -> Result<Self, Self::Err> {
Ok(Self::from_string(language))
}
Expand Down

0 comments on commit de6c626

Please sign in to comment.