@@ -19,7 +19,7 @@ use ratatui::{
1919 backend:: Backend ,
2020 layout:: { Constraint , Direction , Layout , Rect } ,
2121 style:: { Modifier , Style } ,
22- text:: { Span , Spans , Text } ,
22+ text:: { Line , Span , Text } ,
2323 Frame ,
2424} ;
2525use std:: clone:: Clone ;
@@ -133,7 +133,7 @@ impl DetailsComponent {
133133 & self ,
134134 width : usize ,
135135 height : usize ,
136- ) -> Vec < Spans > {
136+ ) -> Vec < Line > {
137137 let ( wrapped_title, wrapped_message) =
138138 Self :: get_wrapped_lines ( & self . data , width) ;
139139
@@ -144,7 +144,7 @@ impl DetailsComponent {
144144 . skip ( self . scroll . get_top ( ) )
145145 . take ( height)
146146 . map ( |( i, line) | {
147- Spans :: from ( vec ! [ Span :: styled(
147+ Line :: from ( vec ! [ Span :: styled(
148148 line. clone( ) ,
149149 self . get_theme_for_line( i < wrapped_title. len( ) ) ,
150150 ) ] )
@@ -153,10 +153,10 @@ impl DetailsComponent {
153153 }
154154
155155 #[ allow( unstable_name_collisions, clippy:: too_many_lines) ]
156- fn get_text_info ( & self ) -> Vec < Spans > {
156+ fn get_text_info ( & self ) -> Vec < Line > {
157157 self . data . as_ref ( ) . map_or_else ( Vec :: new, |data| {
158158 let mut res = vec ! [
159- Spans :: from( vec![
159+ Line :: from( vec![
160160 style_detail( & self . theme, & Detail :: Author ) ,
161161 Span :: styled(
162162 Cow :: from( format!(
@@ -166,7 +166,7 @@ impl DetailsComponent {
166166 self . theme. text( true , false ) ,
167167 ) ,
168168 ] ) ,
169- Spans :: from( vec![
169+ Line :: from( vec![
170170 style_detail( & self . theme, & Detail :: Date ) ,
171171 Span :: styled(
172172 Cow :: from( time_to_string(
@@ -180,7 +180,7 @@ impl DetailsComponent {
180180
181181 if let Some ( ref committer) = data. committer {
182182 res. extend ( vec ! [
183- Spans :: from( vec![
183+ Line :: from( vec![
184184 style_detail( & self . theme, & Detail :: Commiter ) ,
185185 Span :: styled(
186186 Cow :: from( format!(
@@ -190,7 +190,7 @@ impl DetailsComponent {
190190 self . theme. text( true , false ) ,
191191 ) ,
192192 ] ) ,
193- Spans :: from( vec![
193+ Line :: from( vec![
194194 style_detail( & self . theme, & Detail :: Date ) ,
195195 Span :: styled(
196196 Cow :: from( time_to_string(
@@ -203,7 +203,7 @@ impl DetailsComponent {
203203 ] ) ;
204204 }
205205
206- res. push ( Spans :: from ( vec ! [
206+ res. push ( Line :: from ( vec ! [
207207 Span :: styled(
208208 Cow :: from( strings:: commit:: details_sha( ) ) ,
209209 self . theme. text( false , false ) ,
@@ -215,12 +215,12 @@ impl DetailsComponent {
215215 ] ) ) ;
216216
217217 if !self . tags . is_empty ( ) {
218- res. push ( Spans :: from ( style_detail (
218+ res. push ( Line :: from ( style_detail (
219219 & self . theme ,
220220 & Detail :: Sha ,
221221 ) ) ) ;
222222
223- res. push ( Spans :: from (
223+ res. push ( Line :: from (
224224 itertools:: Itertools :: intersperse (
225225 self . tags . iter ( ) . map ( |tag| {
226226 Span :: styled (
0 commit comments