@@ -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