mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 07:04:17 +00:00
refactor: clippy::too_many_lines (#974)
This commit is contained in:
parent
e3afe7c8a1
commit
c8c7924e0c
7 changed files with 8 additions and 0 deletions
|
@ -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"
|
||||
|
|
|
@ -663,6 +663,7 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_lines)]
|
||||
#[test]
|
||||
fn style_can_be_stylized() {
|
||||
// foreground colors
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue