Skip to content

Commit f90264b

Browse files
authored
Merge pull request #14 from mkroman/update-deps
Update dependencies
2 parents b70e9e0 + 83e7935 commit f90264b

3 files changed

Lines changed: 36 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 30 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
crossterm = "0.26.1"
10-
tui = { package = "ratatui", version = "0.20.1" }
10+
tui = { package = "ratatui", version = "0.22.0" }
1111
unicode-width = "0.1.10"
1212
reqwest = { version = "0.11", default-features = false, features = [
1313
"blocking",
@@ -16,7 +16,7 @@ reqwest = { version = "0.11", default-features = false, features = [
1616
] }
1717
serde_json = "1.0"
1818
termimad = "0.20"
19-
ansi-to-tui = "3.0.0"
19+
ansi-to-tui = "3.1.0"
2020

2121
clap = { version = "4", features = ["derive", "cargo"] }
2222
toml = { version = "0.7" }

src/ui.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use tui::{
77
backend::Backend,
88
layout::{Constraint, Direction, Layout, Rect},
99
style::{Color, Style},
10-
text::{Span, Spans, Text},
10+
text::{Line, Span, Text},
1111
widgets::{Block, BorderType, Borders, Clear, List, ListItem, Paragraph, Wrap},
1212
Frame,
1313
};
@@ -148,7 +148,7 @@ pub fn render<B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) {
148148
app.scroll = 2
149149
}
150150
}
151-
Paragraph::new(app.prompt.as_ref())
151+
Paragraph::new(app.prompt.as_str())
152152
.wrap(Wrap { trim: false })
153153
.scroll((scroll as u16, 0))
154154
.style(Style::default())
@@ -273,14 +273,14 @@ pub fn render<B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) {
273273

274274
let history = List::new({
275275
if app.history.is_empty() {
276-
vec![ListItem::new(Spans::from(Span::from("History is empty")))]
276+
vec![ListItem::new(Line::from(Span::from("History is empty")))]
277277
} else {
278278
app.history
279279
.iter()
280280
.enumerate()
281281
.map(|(i, c)| {
282282
let msg = c[0].clone().strip_prefix(" : ").unwrap().to_string();
283-
let content = Spans::from(Span::from(msg));
283+
let content = Line::from(Span::from(msg));
284284
ListItem::new(content).style({
285285
if app.history_thread_index == i {
286286
Style::default().bg(Color::Rgb(50, 54, 26))

0 commit comments

Comments
 (0)