srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/decoration/tests.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2026-08-21 19:24:00 +0200
committersrdusr <[email protected]>2026-08-21 19:24:00 +0200
commitd440a3992e8a0fa49857210e646b0d653dfa7675 (patch)
tree8d0bbd904ac0ab0cffac49060d540acf1fc0236f /crates/wayland/src/decoration/tests.rs
parentf7426a86f2ccc40a18bc6b21d92fc3f073490de1 (diff)
downloadsrdwm-d440a3992e8a0fa49857210e646b0d653dfa7675.tar.gz
srdwm-d440a3992e8a0fa49857210e646b0d653dfa7675.zip
Put back the allow attribute my last commit orphaned
Inserting the title-elision helper directly above render_titlebar pushed that function away from its own #[allow(clippy::too_many_arguments)], which then applied to a const and left the function warning again. Third time I have done this to an attribute in this tree; the pattern is inserting at a "just before this function" anchor without checking what sits immediately above it. Also `"x".repeat(20_000)` in the new test, which clippy asked for. Clippy is clean again - and it was not when I said it was in the previous commit: the check printed its own "ok" line unconditionally, so three real warnings scrolled past above it.
Diffstat (limited to 'crates/wayland/src/decoration/tests.rs')
-rw-r--r--crates/wayland/src/decoration/tests.rs2
1 files changed, 1 insertions, 1 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);
}