Skip to content

Commit

Permalink
run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
msparkles committed Jul 3, 2024
1 parent 75b5829 commit c8ae194
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/yakui-widgets/src/text_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl InnerAtlas {
rect,
offset,
tex_rect: rect.as_rect().div_vec2(texture_size.as_vec2()),
texture: self.texture.unwrap().clone(),
texture: self.texture.unwrap(),
});
}

Expand Down Expand Up @@ -159,7 +159,7 @@ impl InnerAtlas {
rect,
offset,
tex_rect: rect.as_rect().div_vec2(texture_size.as_vec2()),
texture: self.texture.unwrap().clone(),
texture: self.texture.unwrap(),
})
}

Expand Down Expand Up @@ -230,7 +230,7 @@ impl InnerState {
.get_or_insert(paint, font_system, &mut self.swash, glyph, None);

match a {
Ok(glyph) => return Some(glyph),
Ok(glyph) => Some(glyph),
Err(image) => {
let b = self.atlas.color_atlas.get_or_insert(
paint,
Expand Down
3 changes: 1 addition & 2 deletions crates/yakui-widgets/src/widgets/render_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ impl Widget for RenderTextBufferWidget {

for layout in buffer.layout_runs() {
for glyph in layout.glyphs {
if let Some(render) = text_global.get_or_insert(ctx.paint, font_system, &glyph)
{
if let Some(render) = text_global.get_or_insert(ctx.paint, font_system, glyph) {
paint_text(
&mut ctx,
self.color,
Expand Down
2 changes: 1 addition & 1 deletion crates/yakui-widgets/src/widgets/textbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl Widget for TextBoxWidget {
editor.with_buffer_mut(|buffer| {
buffer.set_text(
font_system,
&new_text,
new_text,
self.props.style.attrs.as_attrs(),
cosmic_text::Shaping::Advanced,
);
Expand Down

0 comments on commit c8ae194

Please sign in to comment.