Do not pass text size to Preedit::new

This commit is contained in:
rhysd 2025-02-06 09:57:01 +09:00
parent fcdf53afde
commit cf851e133a
3 changed files with 12 additions and 8 deletions

View file

@ -40,14 +40,11 @@ pub struct Preedit<T = String> {
impl<T> Preedit<T> {
/// Creates a new empty [`Preedit`].
pub fn new(text_size: Option<impl Into<Pixels>>) -> Self
pub fn new() -> Self
where
T: Default,
{
Self {
text_size: text_size.map(Into::into),
..Default::default()
}
Self::default()
}
/// Turns a [`Preedit`] into its owned version.