@@ -19,7 +19,7 @@ use ratatui::{
19
19
backend:: Backend ,
20
20
layout:: { Constraint , Direction , Layout , Rect } ,
21
21
style:: { Modifier , Style } ,
22
- text:: { Span , Spans , Text } ,
22
+ text:: { Line , Span , Text } ,
23
23
Frame ,
24
24
} ;
25
25
use std:: clone:: Clone ;
@@ -133,7 +133,7 @@ impl DetailsComponent {
133
133
& self ,
134
134
width : usize ,
135
135
height : usize ,
136
- ) -> Vec < Spans > {
136
+ ) -> Vec < Line > {
137
137
let ( wrapped_title, wrapped_message) =
138
138
Self :: get_wrapped_lines ( & self . data , width) ;
139
139
@@ -144,7 +144,7 @@ impl DetailsComponent {
144
144
. skip ( self . scroll . get_top ( ) )
145
145
. take ( height)
146
146
. map ( |( i, line) | {
147
- Spans :: from ( vec ! [ Span :: styled(
147
+ Line :: from ( vec ! [ Span :: styled(
148
148
line. clone( ) ,
149
149
self . get_theme_for_line( i < wrapped_title. len( ) ) ,
150
150
) ] )
@@ -153,10 +153,10 @@ impl DetailsComponent {
153
153
}
154
154
155
155
#[ allow( unstable_name_collisions, clippy:: too_many_lines) ]
156
- fn get_text_info ( & self ) -> Vec < Spans > {
156
+ fn get_text_info ( & self ) -> Vec < Line > {
157
157
self . data . as_ref ( ) . map_or_else ( Vec :: new, |data| {
158
158
let mut res = vec ! [
159
- Spans :: from( vec![
159
+ Line :: from( vec![
160
160
style_detail( & self . theme, & Detail :: Author ) ,
161
161
Span :: styled(
162
162
Cow :: from( format!(
@@ -166,7 +166,7 @@ impl DetailsComponent {
166
166
self . theme. text( true , false ) ,
167
167
) ,
168
168
] ) ,
169
- Spans :: from( vec![
169
+ Line :: from( vec![
170
170
style_detail( & self . theme, & Detail :: Date ) ,
171
171
Span :: styled(
172
172
Cow :: from( time_to_string(
@@ -180,7 +180,7 @@ impl DetailsComponent {
180
180
181
181
if let Some ( ref committer) = data. committer {
182
182
res. extend ( vec ! [
183
- Spans :: from( vec![
183
+ Line :: from( vec![
184
184
style_detail( & self . theme, & Detail :: Commiter ) ,
185
185
Span :: styled(
186
186
Cow :: from( format!(
@@ -190,7 +190,7 @@ impl DetailsComponent {
190
190
self . theme. text( true , false ) ,
191
191
) ,
192
192
] ) ,
193
- Spans :: from( vec![
193
+ Line :: from( vec![
194
194
style_detail( & self . theme, & Detail :: Date ) ,
195
195
Span :: styled(
196
196
Cow :: from( time_to_string(
@@ -203,7 +203,7 @@ impl DetailsComponent {
203
203
] ) ;
204
204
}
205
205
206
- res. push ( Spans :: from ( vec ! [
206
+ res. push ( Line :: from ( vec ! [
207
207
Span :: styled(
208
208
Cow :: from( strings:: commit:: details_sha( ) ) ,
209
209
self . theme. text( false , false ) ,
@@ -215,12 +215,12 @@ impl DetailsComponent {
215
215
] ) ) ;
216
216
217
217
if !self . tags . is_empty ( ) {
218
- res. push ( Spans :: from ( style_detail (
218
+ res. push ( Line :: from ( style_detail (
219
219
& self . theme ,
220
220
& Detail :: Sha ,
221
221
) ) ) ;
222
222
223
- res. push ( Spans :: from (
223
+ res. push ( Line :: from (
224
224
itertools:: Itertools :: intersperse (
225
225
self . tags . iter ( ) . map ( |tag| {
226
226
Span :: styled (
0 commit comments