refactor: clippy::too_many_lines (#974)

This commit is contained in:
EdJoPaTo 2024-03-02 12:11:01 +01:00 committed by Josh McKinney
parent e3afe7c8a1
commit c8c7924e0c
No known key found for this signature in database
GPG key ID: 722287396A903BC5
7 changed files with 8 additions and 0 deletions

View file

@ -81,6 +81,7 @@ needless_for_each = "warn"
needless_pass_by_value = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
too_many_lines = "warn"
trivially_copy_pass_by_ref = "warn"
unreadable_literal = "warn"
use_self = "warn"

View file

@ -663,6 +663,7 @@ mod tests {
);
}
#[allow(clippy::too_many_lines)]
#[test]
fn style_can_be_stylized() {
// foreground colors

View file

@ -874,6 +874,7 @@ mod tests {
assert_eq!(block.borders, Borders::all());
}
#[allow(clippy::too_many_lines)]
#[test]
fn inner_takes_into_account_the_borders() {
// No borders

View file

@ -924,6 +924,7 @@ impl Widget for Chart<'_> {
}
impl WidgetRef for Chart<'_> {
#[allow(clippy::too_many_lines)]
fn render_ref(&self, area: Rect, buf: &mut Buffer) {
buf.set_style(area, self.style);
@ -1370,6 +1371,7 @@ mod tests {
}
}
#[allow(clippy::too_many_lines)]
#[test]
fn test_legend_of_chart_have_odd_margin_size() {
let name = "Data";

View file

@ -1243,6 +1243,7 @@ mod tests {
);
}
#[allow(clippy::too_many_lines)]
#[test]
fn test_list_combinations() {
fn test_case_render(items: &[ListItem], expected_lines: Vec<&str>) {

View file

@ -65,6 +65,7 @@ where
O: Iterator<Item = (I, Alignment)>,
I: Iterator<Item = StyledGrapheme<'a>>,
{
#[allow(clippy::too_many_lines)]
fn next_line<'lend>(&'lend mut self) -> Option<WrappedLine<'lend, 'a>> {
if self.max_line_width == 0 {
return None;

View file

@ -1516,6 +1516,7 @@ mod tests {
);
}
#[allow(clippy::too_many_lines)]
#[test]
fn insufficient_area_highlight_symbol_and_column_spacing_allocation() {
// column spacing is prioritized over every other constraint