srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'crates/wayland')
-rw-r--r--crates/wayland/src/decoration/tests.rs2
-rw-r--r--crates/wayland/src/decoration/titlebar.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/wayland/src/decoration/tests.rs b/crates/wayland/src/decoration/tests.rs
index 0f1a9ab..c777f06 100644
--- a/crates/wayland/src/decoration/tests.rs
+++ b/crates/wayland/src/decoration/tests.rs
@@ -1010,7 +1010,7 @@ fn a_titlebar_with_no_room_at_all_draws_no_title() {
#[test]
fn a_pathologically_long_title_is_bounded() {
let Some(font) = super::font::find_system_font() else { return };
- let huge: String = std::iter::repeat('x').take(20_000).collect();
+ let huge = "x".repeat(20_000);
let laid_out = super::titlebar::lay_out_title(&font, &huge, 400.0);
assert!(laid_out.len() < super::titlebar::MAX_TITLE_CHARS);
}
diff --git a/crates/wayland/src/decoration/titlebar.rs b/crates/wayland/src/decoration/titlebar.rs
index e03c5e9..cc861ab 100644
--- a/crates/wayland/src/decoration/titlebar.rs
+++ b/crates/wayland/src/decoration/titlebar.rs
@@ -35,7 +35,6 @@ use super::font::{blit_glyph, find_system_font, FONT_PIXELS, TEXT_LEFT_PADDING};
/// titlebar (there is none in practice - an undecorated window has no
/// titlebar at all - but `0` is also the correct, harmless value if
/// `round_corners` handling ever changes to allow it).
-#[allow(clippy::too_many_arguments)]
/// The most characters of a title that are ever measured.
///
/// Nothing legible survives past this in any titlebar a person would use,
@@ -96,6 +95,7 @@ pub(crate) fn lay_out_title(font: &fontdue::Font, title: &str, available: f32) -
glyphs
}
+#[allow(clippy::too_many_arguments)]
pub fn render_titlebar(
width: u32,
height: u32,