chore: apply clippy suggestions

This commit is contained in:
Cheong Lau 2025-10-05 12:27:32 +10:00 committed by Michael Murphy
parent 34f55d6720
commit a27bb5e05d
34 changed files with 116 additions and 146 deletions

View file

@ -292,7 +292,7 @@ where
/// ```
#[must_use]
#[inline]
pub fn insert(&mut self) -> EntityMut<SelectionMode> {
pub fn insert(&mut self) -> EntityMut<'_, SelectionMode> {
let id = self.items.insert(Settings::default());
self.order.push_back(id);
EntityMut { model: self, id }
@ -447,7 +447,11 @@ where
/// println!("{:?} had text {}", id, old_text)
/// }
/// ```
pub fn text_set(&mut self, id: Entity, text: impl Into<Cow<'static, str>>) -> Option<Cow<str>> {
pub fn text_set(
&mut self,
id: Entity,
text: impl Into<Cow<'static, str>>,
) -> Option<Cow<'_, str>> {
if !self.contains_item(id) {
return None;
}