@@ -334,7 +334,7 @@ where
334334/// use rustworkx_core::generators::sbm_random_graph;
335335///
336336/// let g = sbm_random_graph::<petgraph::graph::DiGraph<(), ()>, (), _, _, ()>(
337- /// &vec! [1, 2],
337+ /// &[1, 2],
338338/// &ndarray::arr2(&[[0., 1.], [0., 1.]]).view(),
339339/// true,
340340/// Some(10),
@@ -1018,7 +1018,7 @@ mod tests {
10181018 #[ test]
10191019 fn test_sbm_directed_complete_blocks_loops ( ) {
10201020 let g = sbm_random_graph :: < petgraph:: graph:: DiGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1021- & vec ! [ 1 , 2 ] ,
1021+ & [ 1 , 2 ] ,
10221022 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 0. , 1. ] ] ) . view ( ) ,
10231023 true ,
10241024 Some ( 10 ) ,
@@ -1029,16 +1029,16 @@ mod tests {
10291029 assert_eq ! ( g. node_count( ) , 3 ) ;
10301030 assert_eq ! ( g. edge_count( ) , 6 ) ;
10311031 for ( u, v) in [ ( 1 , 1 ) , ( 1 , 2 ) , ( 2 , 1 ) , ( 2 , 2 ) , ( 0 , 1 ) , ( 0 , 2 ) ] {
1032- assert_eq ! ( g. contains_edge( u. into( ) , v. into( ) ) , true ) ;
1032+ assert ! ( g. contains_edge( u. into( ) , v. into( ) ) ) ;
10331033 }
1034- assert_eq ! ( g. contains_edge( 1 . into( ) , 0 . into( ) ) , false ) ;
1035- assert_eq ! ( g. contains_edge( 2 . into( ) , 0 . into( ) ) , false ) ;
1034+ assert ! ( ! g. contains_edge( 1 . into( ) , 0 . into( ) ) ) ;
1035+ assert ! ( ! g. contains_edge( 2 . into( ) , 0 . into( ) ) ) ;
10361036 }
10371037
10381038 #[ test]
10391039 fn test_sbm_undirected_complete_blocks_loops ( ) {
10401040 let g = sbm_random_graph :: < petgraph:: graph:: UnGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1041- & vec ! [ 1 , 2 ] ,
1041+ & [ 1 , 2 ] ,
10421042 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 1. , 1. ] ] ) . view ( ) ,
10431043 true ,
10441044 Some ( 10 ) ,
@@ -1049,15 +1049,15 @@ mod tests {
10491049 assert_eq ! ( g. node_count( ) , 3 ) ;
10501050 assert_eq ! ( g. edge_count( ) , 5 ) ;
10511051 for ( u, v) in [ ( 1 , 1 ) , ( 1 , 2 ) , ( 2 , 2 ) , ( 0 , 1 ) , ( 0 , 2 ) ] {
1052- assert_eq ! ( g. contains_edge( u. into( ) , v. into( ) ) , true ) ;
1052+ assert ! ( g. contains_edge( u. into( ) , v. into( ) ) ) ;
10531053 }
1054- assert_eq ! ( g. contains_edge( 0 . into( ) , 0 . into( ) ) , false ) ;
1054+ assert ! ( ! g. contains_edge( 0 . into( ) , 0 . into( ) ) ) ;
10551055 }
10561056
10571057 #[ test]
10581058 fn test_sbm_directed_complete_blocks_noloops ( ) {
10591059 let g = sbm_random_graph :: < petgraph:: graph:: DiGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1060- & vec ! [ 1 , 2 ] ,
1060+ & [ 1 , 2 ] ,
10611061 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 0. , 1. ] ] ) . view ( ) ,
10621062 false ,
10631063 Some ( 10 ) ,
@@ -1068,19 +1068,19 @@ mod tests {
10681068 assert_eq ! ( g. node_count( ) , 3 ) ;
10691069 assert_eq ! ( g. edge_count( ) , 4 ) ;
10701070 for ( u, v) in [ ( 1 , 2 ) , ( 2 , 1 ) , ( 0 , 1 ) , ( 0 , 2 ) ] {
1071- assert_eq ! ( g. contains_edge( u. into( ) , v. into( ) ) , true ) ;
1071+ assert ! ( g. contains_edge( u. into( ) , v. into( ) ) ) ;
10721072 }
1073- assert_eq ! ( g. contains_edge( 1 . into( ) , 0 . into( ) ) , false ) ;
1074- assert_eq ! ( g. contains_edge( 2 . into( ) , 0 . into( ) ) , false ) ;
1073+ assert ! ( ! g. contains_edge( 1 . into( ) , 0 . into( ) ) ) ;
1074+ assert ! ( ! g. contains_edge( 2 . into( ) , 0 . into( ) ) ) ;
10751075 for u in 0 ..2 {
1076- assert_eq ! ( g. contains_edge( u. into( ) , u. into( ) ) , false ) ;
1076+ assert ! ( ! g. contains_edge( u. into( ) , u. into( ) ) ) ;
10771077 }
10781078 }
10791079
10801080 #[ test]
10811081 fn test_sbm_undirected_complete_blocks_noloops ( ) {
10821082 let g = sbm_random_graph :: < petgraph:: graph:: UnGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1083- & vec ! [ 1 , 2 ] ,
1083+ & [ 1 , 2 ] ,
10841084 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 1. , 1. ] ] ) . view ( ) ,
10851085 false ,
10861086 Some ( 10 ) ,
@@ -1091,17 +1091,17 @@ mod tests {
10911091 assert_eq ! ( g. node_count( ) , 3 ) ;
10921092 assert_eq ! ( g. edge_count( ) , 3 ) ;
10931093 for ( u, v) in [ ( 1 , 2 ) , ( 0 , 1 ) , ( 0 , 2 ) ] {
1094- assert_eq ! ( g. contains_edge( u. into( ) , v. into( ) ) , true ) ;
1094+ assert ! ( g. contains_edge( u. into( ) , v. into( ) ) ) ;
10951095 }
10961096 for u in 0 ..2 {
1097- assert_eq ! ( g. contains_edge( u. into( ) , u. into( ) ) , false ) ;
1097+ assert ! ( ! g. contains_edge( u. into( ) , u. into( ) ) ) ;
10981098 }
10991099 }
11001100
11011101 #[ test]
11021102 fn test_sbm_bad_array_rows_error ( ) {
11031103 match sbm_random_graph :: < petgraph:: graph:: DiGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1104- & vec ! [ 1 , 2 ] ,
1104+ & [ 1 , 2 ] ,
11051105 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 1. , 1. ] , [ 1. , 1. ] ] ) . view ( ) ,
11061106 true ,
11071107 Some ( 10 ) ,
@@ -1116,7 +1116,7 @@ mod tests {
11161116
11171117 fn test_sbm_bad_array_cols_error ( ) {
11181118 match sbm_random_graph :: < petgraph:: graph:: DiGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1119- & vec ! [ 1 , 2 ] ,
1119+ & [ 1 , 2 ] ,
11201120 & ndarray:: arr2 ( & [ [ 0. , 1. , 1. ] , [ 1. , 1. , 1. ] ] ) . view ( ) ,
11211121 true ,
11221122 Some ( 10 ) ,
@@ -1131,7 +1131,7 @@ mod tests {
11311131 #[ test]
11321132 fn test_sbm_asymmetric_array_error ( ) {
11331133 match sbm_random_graph :: < petgraph:: graph:: UnGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1134- & vec ! [ 1 , 2 ] ,
1134+ & [ 1 , 2 ] ,
11351135 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 0. , 1. ] ] ) . view ( ) ,
11361136 true ,
11371137 Some ( 10 ) ,
@@ -1146,7 +1146,7 @@ mod tests {
11461146 #[ test]
11471147 fn test_sbm_invalid_probability_error ( ) {
11481148 match sbm_random_graph :: < petgraph:: graph:: UnGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1149- & vec ! [ 1 , 2 ] ,
1149+ & [ 1 , 2 ] ,
11501150 & ndarray:: arr2 ( & [ [ 0. , 1. ] , [ 0. , -1. ] ] ) . view ( ) ,
11511151 true ,
11521152 Some ( 10 ) ,
@@ -1161,7 +1161,7 @@ mod tests {
11611161 #[ test]
11621162 fn test_sbm_empty_error ( ) {
11631163 match sbm_random_graph :: < petgraph:: graph:: DiGraph < ( ) , ( ) > , ( ) , _ , _ , ( ) > (
1164- & vec ! [ ] ,
1164+ & [ ] ,
11651165 & ndarray:: arr2 ( & [ [ ] ] ) . view ( ) ,
11661166 true ,
11671167 Some ( 10 ) ,
@@ -1355,10 +1355,7 @@ mod tests {
13551355 }
13561356 #[ test]
13571357 fn test_hyperbolic_dist_inf ( ) {
1358- assert_eq ! (
1359- hyperbolic_distance( & [ f64 :: INFINITY , 0. ] , & [ 0. , 0. ] ) . is_nan( ) ,
1360- true
1361- ) ;
1358+ assert ! ( hyperbolic_distance( & [ f64 :: INFINITY , 0. ] , & [ 0. , 0. ] ) . is_nan( ) ) ;
13621359 }
13631360
13641361 #[ test]
0 commit comments