clippy fixes
This commit is contained in:
@@ -28,7 +28,7 @@ fn main() -> Result<()> {
|
||||
let mut terminal = Terminal::new(backend)?;
|
||||
|
||||
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());
|
||||
// create app and run it
|
||||
let mut appSettings = AppState::new(format!("{configHome}/steckbrett.conf"));
|
||||
|
||||
@@ -9,8 +9,8 @@ use ratatui::{
|
||||
widgets::{Block, Borders, Cell, Row, Table},
|
||||
};
|
||||
|
||||
pub fn getTableElement<'a>(
|
||||
entries: &Vec<Entry>,
|
||||
pub fn getTableElement(
|
||||
entries: &[Entry],
|
||||
curScreen: &CurrentScreen,
|
||||
appStatus: &AppStatus,
|
||||
isHashDifferent: bool,
|
||||
@@ -46,7 +46,7 @@ pub fn getTableElement<'a>(
|
||||
}
|
||||
};
|
||||
|
||||
let table = Table::new(
|
||||
Table::new(
|
||||
dataRows,
|
||||
[
|
||||
Constraint::Percentage(4),
|
||||
@@ -67,6 +67,5 @@ pub fn getTableElement<'a>(
|
||||
Style::default()
|
||||
.add_modifier(Modifier::REVERSED)
|
||||
.fg(selectedColor),
|
||||
);
|
||||
table
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,10 +16,8 @@ pub fn getExitPara() -> Paragraph<'static> {
|
||||
Line::from("ANY UNSAVED CHANGES WILL BE DISCARDED."),
|
||||
Line::from("Press (s) to save from the main screen."),
|
||||
]);
|
||||
let exitPara = Paragraph::new(exitText)
|
||||
Paragraph::new(exitText)
|
||||
.block(exitPopup)
|
||||
.wrap(Wrap { trim: false })
|
||||
.style(Style::default().fg(Color::White));
|
||||
|
||||
exitPara
|
||||
.style(Style::default().fg(Color::White))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user