@@ -233,9 +233,11 @@ fn draw_short_no_line_numbers() {
233233
234234 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
235235
236- assert ! ( String :: from_utf8( out)
237- . expect( "Should have written valid UTF-8" )
238- . contains( "\r A line\n \r Another line" ) ) ;
236+ assert ! (
237+ String :: from_utf8( out)
238+ . expect( "Should have written valid UTF-8" )
239+ . contains( "\r A line\n \r Another line" )
240+ ) ;
239241 assert_eq ! ( pager. upper_mark, 0 ) ;
240242
241243 let mut out = Vec :: with_capacity ( lines. len ( ) ) ;
@@ -245,9 +247,11 @@ fn draw_short_no_line_numbers() {
245247
246248 // The number of lines is less than 'rows' so 'upper_mark' will be 0 even
247249 // if we set it to 1. This is done because everything can be displayed without problems.
248- assert ! ( String :: from_utf8( out)
249- . expect( "Should have written valid UTF-8" )
250- . contains( "\r A line\n \r Another line" ) ) ;
250+ assert ! (
251+ String :: from_utf8( out)
252+ . expect( "Should have written valid UTF-8" )
253+ . contains( "\r A line\n \r Another line" )
254+ ) ;
251255 assert_eq ! ( pager. upper_mark, 0 ) ;
252256}
253257
@@ -264,9 +268,11 @@ fn draw_long_no_line_numbers() {
264268
265269 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
266270
267- assert ! ( String :: from_utf8( out)
268- . expect( "Should have written valid UTF-8" )
269- . contains( "\r A line\n \r Another line" ) ) ;
271+ assert ! (
272+ String :: from_utf8( out)
273+ . expect( "Should have written valid UTF-8" )
274+ . contains( "\r A line\n \r Another line" )
275+ ) ;
270276 assert_eq ! ( pager. upper_mark, 0 ) ;
271277
272278 // This ensures that asking for a position other than 0 works.
@@ -275,9 +281,11 @@ fn draw_long_no_line_numbers() {
275281
276282 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
277283
278- assert ! ( String :: from_utf8( out)
279- . expect( "Should have written valid UTF-8" )
280- . contains( "\r Another line\n \r Third line" ) ) ;
284+ assert ! (
285+ String :: from_utf8( out)
286+ . expect( "Should have written valid UTF-8" )
287+ . contains( "\r Another line\n \r Third line" )
288+ ) ;
281289 assert_eq ! ( pager. upper_mark, 1 ) ;
282290
283291 // This test ensures that as much text as possible will be displayed, even
@@ -287,9 +295,11 @@ fn draw_long_no_line_numbers() {
287295
288296 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
289297
290- assert ! ( String :: from_utf8( out)
291- . expect( "Should have written valid UTF-8" )
292- . contains( "\r Third line\n \r Fourth line" ) ) ;
298+ assert ! (
299+ String :: from_utf8( out)
300+ . expect( "Should have written valid UTF-8" )
301+ . contains( "\r Third line\n \r Fourth line" )
302+ ) ;
293303 assert_eq ! ( pager. upper_mark, 2 ) ;
294304}
295305
@@ -303,9 +313,11 @@ fn draw_short_with_line_numbers() {
303313 pager. format_lines ( ) ;
304314
305315 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
306- assert ! ( String :: from_utf8( out)
307- . expect( "Should have written valid UTF-8" )
308- . contains( "\r 1. A line\n \r 2. Another line" ) ) ;
316+ assert ! (
317+ String :: from_utf8( out)
318+ . expect( "Should have written valid UTF-8" )
319+ . contains( "\r 1. A line\n \r 2. Another line" )
320+ ) ;
309321 assert_eq ! ( pager. upper_mark, 0 ) ;
310322
311323 let mut out = Vec :: with_capacity ( lines. len ( ) ) ;
@@ -315,9 +327,11 @@ fn draw_short_with_line_numbers() {
315327
316328 // The number of lines is less than 'rows' so 'upper_mark' will be 0 even
317329 // if we set it to 1. This is done because everything can be displayed without problems.
318- assert ! ( String :: from_utf8( out)
319- . expect( "Should have written valid UTF-8" )
320- . contains( "\r 1. A line\n \r 2. Another line" ) ) ;
330+ assert ! (
331+ String :: from_utf8( out)
332+ . expect( "Should have written valid UTF-8" )
333+ . contains( "\r 1. A line\n \r 2. Another line" )
334+ ) ;
321335 assert_eq ! ( pager. upper_mark, 0 ) ;
322336}
323337
@@ -335,9 +349,11 @@ fn draw_long_with_line_numbers() {
335349
336350 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
337351
338- assert ! ( String :: from_utf8( out)
339- . expect( "Should have written valid UTF-8" )
340- . contains( "\r 1. A line\n \r 2. Another line" ) ) ;
352+ assert ! (
353+ String :: from_utf8( out)
354+ . expect( "Should have written valid UTF-8" )
355+ . contains( "\r 1. A line\n \r 2. Another line" )
356+ ) ;
341357 assert_eq ! ( pager. upper_mark, 0 ) ;
342358
343359 // This ensures that asking for a position other than 0 works.
@@ -346,9 +362,11 @@ fn draw_long_with_line_numbers() {
346362
347363 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
348364
349- assert ! ( String :: from_utf8( out)
350- . expect( "Should have written valid UTF-8" )
351- . contains( "\r 2. Another line\n \r 3. Third line" ) ) ;
365+ assert ! (
366+ String :: from_utf8( out)
367+ . expect( "Should have written valid UTF-8" )
368+ . contains( "\r 2. Another line\n \r 3. Third line" )
369+ ) ;
352370 assert_eq ! ( pager. upper_mark, 1 ) ;
353371
354372 // This test ensures that as much text as possible will be displayed, even
@@ -358,9 +376,11 @@ fn draw_long_with_line_numbers() {
358376
359377 assert ! ( draw_full( & mut out, & mut pager) . is_ok( ) ) ;
360378
361- assert ! ( String :: from_utf8( out)
362- . expect( "Should have written valid UTF-8" )
363- . contains( "\r 3. Third line\n \r 4. Fourth line" ) ) ;
379+ assert ! (
380+ String :: from_utf8( out)
381+ . expect( "Should have written valid UTF-8" )
382+ . contains( "\r 3. Third line\n \r 4. Fourth line" )
383+ ) ;
364384 assert_eq ! ( pager. upper_mark, 2 ) ;
365385}
366386
@@ -439,9 +459,11 @@ fn test_draw_no_overflow() {
439459 pager. screen . orig_text = TEXT . to_string ( ) ;
440460 pager. format_lines ( ) ;
441461 draw_full ( & mut out, & mut pager) . unwrap ( ) ;
442- assert ! ( String :: from_utf8( out)
443- . expect( "Should have written valid UTF-8" )
444- . contains( TEXT ) ) ;
462+ assert ! (
463+ String :: from_utf8( out)
464+ . expect( "Should have written valid UTF-8" )
465+ . contains( TEXT )
466+ ) ;
445467}
446468
447469#[ cfg( test) ]
0 commit comments