clippy fixes
All checks were successful
/ Quality Check (push) Successful in 1m3s
/ Build (push) Successful in 1m10s

This commit is contained in:
Phani Pavan K
2025-10-26 12:24:54 +05:30
parent f83d6038c8
commit 1b8275c911
3 changed files with 7 additions and 10 deletions

View File

@@ -28,7 +28,7 @@ fn main() -> Result<()> {
let mut terminal = Terminal::new(backend)?; let mut terminal = Terminal::new(backend)?;
let configHome = var("XDG_CONFIG_HOME") let configHome = var("XDG_CONFIG_HOME")
.or_else(|_| var("HOME").map(|home| format!("{}/.config", home))) .or_else(|_| var("HOME").map(|home| format!("{home}/.config")))
.unwrap_or("~/.config".to_string()); .unwrap_or("~/.config".to_string());
// create app and run it // create app and run it
let mut appSettings = AppState::new(format!("{configHome}/steckbrett.conf")); let mut appSettings = AppState::new(format!("{configHome}/steckbrett.conf"));

View File

@@ -9,8 +9,8 @@ use ratatui::{
widgets::{Block, Borders, Cell, Row, Table}, widgets::{Block, Borders, Cell, Row, Table},
}; };
pub fn getTableElement<'a>( pub fn getTableElement(
entries: &Vec<Entry>, entries: &[Entry],
curScreen: &CurrentScreen, curScreen: &CurrentScreen,
appStatus: &AppStatus, appStatus: &AppStatus,
isHashDifferent: bool, isHashDifferent: bool,
@@ -46,7 +46,7 @@ pub fn getTableElement<'a>(
} }
}; };
let table = Table::new( Table::new(
dataRows, dataRows,
[ [
Constraint::Percentage(4), Constraint::Percentage(4),
@@ -67,6 +67,5 @@ pub fn getTableElement<'a>(
Style::default() Style::default()
.add_modifier(Modifier::REVERSED) .add_modifier(Modifier::REVERSED)
.fg(selectedColor), .fg(selectedColor),
); )
table
} }

View File

@@ -16,10 +16,8 @@ pub fn getExitPara() -> Paragraph<'static> {
Line::from("ANY UNSAVED CHANGES WILL BE DISCARDED."), Line::from("ANY UNSAVED CHANGES WILL BE DISCARDED."),
Line::from("Press (s) to save from the main screen."), Line::from("Press (s) to save from the main screen."),
]); ]);
let exitPara = Paragraph::new(exitText) Paragraph::new(exitText)
.block(exitPopup) .block(exitPopup)
.wrap(Wrap { trim: false }) .wrap(Wrap { trim: false })
.style(Style::default().fg(Color::White)); .style(Style::default().fg(Color::White))
exitPara
} }