clippy fixes
This commit is contained in:
@@ -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"));
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user