Skip to content

Commit

Permalink
Upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dantleech committed Nov 12, 2024
1 parent 6a9d5d7 commit 8a0a0f9
Show file tree
Hide file tree
Showing 9 changed files with 1,029 additions and 599 deletions.
1,576 changes: 1,002 additions & 574 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ polyline = "0.10.1"
geo-types = "0.7.10"
geoutils = "0.5.1"
strum = { version = "0.25.0", features = ["derive"] }
tui = { package = "ratatui", version = "0.23.0", features = ["all-widgets"]}
tui = { package = "ratatui", version = "0.25.0", features = ["all-widgets"]}
tui-input = "0.8.0"
confy = "0.5.1"
hyper-rustls = "0.24.1"
sqlx = { version = "0.7.1", features = ["sqlx-sqlite", "sqlite", "runtime-tokio", "chrono"] }
tui-logger = { version = "0.9.6", features = ["ratatui", "ratatui-support"] }
tui-logger = { version = "0.10.0", features = [] }
19 changes: 9 additions & 10 deletions src/component/activity_list/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,7 @@ pub fn activity_list_table<'a>(app: &App, activities: &'a Activities) -> Table<'
]));
}

Table::new(rows)
.header(
Row::new(headers)
.height(1)
.bottom_margin(1)
.style(Style::default()),
)
.highlight_style(Style::default().add_modifier(Modifier::BOLD))
.highlight_symbol("")
.widths(&[
Table::new(rows, &[
Constraint::Min(10),
Constraint::Min(2),
Constraint::Percentage(20),
Expand All @@ -78,4 +69,12 @@ pub fn activity_list_table<'a>(app: &App, activities: &'a Activities) -> Table<'
Constraint::Percentage(10),
Constraint::Percentage(10),
])
.header(
Row::new(headers)
.height(1)
.bottom_margin(1)
.style(Style::default()),
)
.highlight_style(Style::default().add_modifier(Modifier::BOLD))
.highlight_symbol("")
}
3 changes: 1 addition & 2 deletions src/component/log_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ pub struct LogView {
}
impl LogView {
pub(crate) fn new() -> LogView {
LogView {
}
LogView {}
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/component/race_predictor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ pub fn draw(
]));
}

let table = Table::new(rows)
let table = Table::new(rows, &[Constraint::Length(9), Constraint::Length(10)])
.header(
Row::new(headers)
.height(1)
.bottom_margin(1)
.style(Style::default()),
)
.widths(&[Constraint::Length(9), Constraint::Length(10)]);
);

table.render(area, f);
}
12 changes: 6 additions & 6 deletions src/component/splits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ pub fn draw(
]),
);
}
Table::new(rows)
Table::new(rows, &[
Constraint::Min(3),
Constraint::Percentage(33),
Constraint::Percentage(33),
])
.header(
Row::new(header)
.height(1)
.bottom_margin(0)
.style(Style::default()),

).widths(&[
Constraint::Min(3),
Constraint::Percentage(33),
Constraint::Percentage(33),
])
)
.highlight_style(Style::default().add_modifier(Modifier::BOLD))
.highlight_symbol("")
.render(area, f, &mut app.activity_view_state.pace_table_state);
Expand Down
4 changes: 2 additions & 2 deletions src/expr/evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ impl Evaluator {
pub fn evaluate(&self, expr: &Expr, vars: &Vars) -> Result<bool, String> {
match self.evaluate_expr(&expr, vars)? {
Evalue::Number(n) => {
Err(format!("expression must evluate to a boolean, got {:?}: {:?}", expr, n).to_string())
Err(format!("expression must evaluate to a boolean, got {:?}: {:?}", expr, n).to_string())
}
Evalue::Date(_) | Evalue::String(_) => {
Err(format!("expression must evluate to a boolean, got: {:?}", expr).to_string())
Err(format!("expression must evaluate to a boolean, got: {:?}", expr).to_string())
}
Evalue::Bool(b) => Ok(b),
}
Expand Down
4 changes: 4 additions & 0 deletions src/expr/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ impl From<&str> for QuantityUnit {
match value {
"mph" => Self::Mph,
"kmph" => Self::Kmph,
"m" => Self::Mph,
"mi" => Self::Mph,
"km" => Self::Kmph,
"k" => Self::Kmph,
_ => Self::Kmph,
}
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub fn draw(app: &mut App, f: &mut Buffer, area: Rect, view: &mut dyn View) {
.split(area);

header(app, view.mapped_events(app)).render(rows[0], f);

view.draw(app, f, rows[1]);

status_bar(app).render(rows[2], f);
Expand Down

0 comments on commit 8a0a0f9

Please sign in to comment.