@@ -752,7 +752,7 @@ mod tests {
752752 let forward = tempfile:: tempfile ( ) . expect ( "Cannot create temp file" ) ;
753753 let reverse = tempfile:: tempfile ( ) . expect ( "Cannot create temp file" ) ;
754754 let unknown = tempfile:: tempfile ( ) . expect ( "Cannot create temp file" ) ;
755-
755+
756756 bc_data. insert ( b"ACCGTA" , vec ! [ forward] ) ;
757757 bc_data. insert ( b"ATTGTT" , vec ! [ reverse] ) ;
758758 bc_data. insert ( b"XXX" , vec ! [ unknown] ) ;
@@ -851,8 +851,10 @@ mod tests {
851851
852852 assert ! ( ( write_to_fa( & file, cmp, & record, niffler:: Level :: One ) ) . is_ok( ) ) ;
853853
854- let mut tmpfile = tempfile:: NamedTempFile :: new ( ) . expect ( "Cannot create temp file" ) ;
855- writeln ! ( tmpfile, ">id_str desc\n ATCGCCG" ) . expect ( "Cannot write to tmp file" ) ;
854+ let mut tmpfile =
855+ tempfile:: NamedTempFile :: new ( ) . expect ( "Cannot create temp file" ) ;
856+ writeln ! ( tmpfile, ">id_str desc\n ATCGCCG" )
857+ . expect ( "Cannot write to tmp file" ) ;
856858
857859 let mut fa_records = fasta:: Reader :: from_file ( tmpfile)
858860 . expect ( "Cannot read file." )
@@ -879,8 +881,10 @@ mod tests {
879881
880882 assert ! ( ( write_to_fq( & file, cmp, & record, niffler:: Level :: One ) ) . is_ok( ) ) ;
881883
882- let mut tmpfile = tempfile:: NamedTempFile :: new ( ) . expect ( "Cannot create temp file" ) ;
883- writeln ! ( tmpfile, ">id_str desc\n ATCGCCG\n +\n QQQQQQQ" ) . expect ( "Cannot write to tmp file" ) ;
884+ let mut tmpfile =
885+ tempfile:: NamedTempFile :: new ( ) . expect ( "Cannot create temp file" ) ;
886+ writeln ! ( tmpfile, ">id_str desc\n ATCGCCG\n +\n QQQQQQQ" )
887+ . expect ( "Cannot write to tmp file" ) ;
884888
885889 let mut fa_records = fastq:: Reader :: from_file ( tmpfile)
886890 . expect ( "Cannot read file." )
@@ -935,7 +939,6 @@ mod tests {
935939
936940 #[ test]
937941 fn test_to_niffler_level ( ) {
938-
939942 assert_eq ! ( to_niffler_level( 1 ) , niffler:: Level :: One ) ;
940943 assert_eq ! ( to_niffler_level( 2 ) , niffler:: Level :: Two ) ;
941944 assert_eq ! ( to_niffler_level( 3 ) , niffler:: Level :: Three ) ;
@@ -945,26 +948,42 @@ mod tests {
945948 assert_eq ! ( to_niffler_level( 7 ) , niffler:: Level :: Seven ) ;
946949 assert_eq ! ( to_niffler_level( 8 ) , niffler:: Level :: Eight ) ;
947950 assert_eq ! ( to_niffler_level( 9 ) , niffler:: Level :: Nine ) ;
948-
949951 }
950952
951953 #[ test]
952954 fn test_to_niffler_format ( ) {
953-
954- assert_eq ! ( to_niffler_format( "gz" ) . unwrap( ) , niffler:: compression:: Format :: Gzip ) ;
955- assert_eq ! ( to_niffler_format( "xz" ) . unwrap( ) , niffler:: compression:: Format :: Lzma ) ;
956- assert_eq ! ( to_niffler_format( "bz2" ) . unwrap( ) , niffler:: compression:: Format :: Bzip ) ;
957- assert_eq ! ( to_niffler_format( "txt" ) . unwrap( ) , niffler:: compression:: Format :: No ) ;
958-
955+ assert_eq ! (
956+ to_niffler_format( "gz" ) . unwrap( ) ,
957+ niffler:: compression:: Format :: Gzip
958+ ) ;
959+ assert_eq ! (
960+ to_niffler_format( "xz" ) . unwrap( ) ,
961+ niffler:: compression:: Format :: Lzma
962+ ) ;
963+ assert_eq ! (
964+ to_niffler_format( "bz2" ) . unwrap( ) ,
965+ niffler:: compression:: Format :: Bzip
966+ ) ;
967+ assert_eq ! (
968+ to_niffler_format( "txt" ) . unwrap( ) ,
969+ niffler:: compression:: Format :: No
970+ ) ;
959971 }
960972
961973 #[ test]
962974 fn test_to_compression_ext ( ) {
963-
964- assert_eq ! ( to_compression_ext( niffler:: compression:: Format :: Gzip ) , * ".gz" ) ;
965- assert_eq ! ( to_compression_ext( niffler:: compression:: Format :: Lzma ) , * ".xz" ) ;
966- assert_eq ! ( to_compression_ext( niffler:: compression:: Format :: Bzip ) , * ".bz2" ) ;
975+ assert_eq ! (
976+ to_compression_ext( niffler:: compression:: Format :: Gzip ) ,
977+ * ".gz"
978+ ) ;
979+ assert_eq ! (
980+ to_compression_ext( niffler:: compression:: Format :: Lzma ) ,
981+ * ".xz"
982+ ) ;
983+ assert_eq ! (
984+ to_compression_ext( niffler:: compression:: Format :: Bzip ) ,
985+ * ".bz2"
986+ ) ;
967987 assert_eq ! ( to_compression_ext( niffler:: compression:: Format :: No ) , * "" ) ;
968-
969988 }
970989}
0 commit comments