Skip to content

Commit 4d54d51

Browse files
committed
attempt to fix formatting
1 parent e0fc9fe commit 4d54d51

40 files changed

+64
-61
lines changed

benches/performance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::fmt::{Display, Formatter, Result};
44

5-
use criterion::{criterion_group, criterion_main, Criterion};
5+
use criterion::{Criterion, criterion_group, criterion_main};
66
use hypergraph::{HyperedgeIndex, Hypergraph, VertexIndex};
77
use itertools::Itertools;
88

src/core/hyperedges/add_hyperedge.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
3-
VertexTrait,
2+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
3+
errors::HypergraphError,
44
};
55

66
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/clear_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
bi_hash_map::BiHashMap, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexTrait,
4+
HyperedgeTrait, Hypergraph, VertexTrait, bi_hash_map::BiHashMap, errors::HypergraphError,
55
};
66

77
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/contract_hyperedge_vertices.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use itertools::Itertools;
22
use rayon::prelude::*;
33

44
use crate::{
5-
core::utils::are_slices_equal, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait,
6-
Hypergraph, VertexIndex, VertexTrait,
5+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
6+
core::utils::are_slices_equal, errors::HypergraphError,
77
};
88

99
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/get_hyperedge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
1+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/hyperedges/get_hyperedge_vertices.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
3-
VertexTrait,
2+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
3+
errors::HypergraphError,
44
};
55

66
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/get_hyperedge_weight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
1+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/hyperedges/get_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
3+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> Hypergraph<V, HE>
66
where

src/core/hyperedges/get_hyperedges_connecting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
5-
VertexIndex, VertexTrait,
4+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
5+
errors::HypergraphError,
66
};
77

88
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/get_hyperedges_intersections.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use itertools::Itertools;
22
use rayon::prelude::*;
33

44
use crate::{
5-
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex,
6-
VertexTrait,
5+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
6+
errors::HypergraphError,
77
};
88

99
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/get_internal_hyperedge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
1+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/hyperedges/get_internal_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
1+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/hyperedges/join_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
4+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
55
};
66

77
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/remove_hyperedge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{
2-
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait,
2+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError,
33
};
44

55
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/reverse_hyperedge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait};
3+
use crate::{HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> Hypergraph<V, HE>
66
where

src/core/hyperedges/update_hyperedge_vertices.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
core::utils::are_slices_equal, errors::HypergraphError, HyperedgeIndex, HyperedgeKey,
5-
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
4+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
5+
core::utils::are_slices_equal, errors::HypergraphError,
66
};
77

88
impl<V, HE> Hypergraph<V, HE>

src/core/hyperedges/update_hyperedge_weight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{
2-
errors::HypergraphError, HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait,
2+
HyperedgeIndex, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError,
33
};
44

55
impl<V, HE> Hypergraph<V, HE>

src/core/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait};
3+
use crate::{HyperedgeKey, HyperedgeTrait, Hypergraph, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> IntoIterator for Hypergraph<V, HE>
66
where

src/core/shared.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use itertools::Itertools;
22
use rayon::prelude::*;
33

44
use crate::{
5-
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
5+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
66
};
77

88
/// Enumeration of the different types of connection.

src/core/vertices/add_vertex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{
2+
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
23
core::types::{AIndexSet, ARandomState},
34
errors::HypergraphError,
4-
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
55
};
66

77
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_adjacent_vertices_from.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
5-
VertexTrait,
4+
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
5+
errors::HypergraphError,
66
};
77

88
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_adjacent_vertices_to.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
5-
VertexTrait,
4+
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
5+
errors::HypergraphError,
66
};
77

88
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_dijkstra_connections.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77
use rayon::prelude::*;
88

99
use crate::{
10-
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
10+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
1111
};
1212

1313
#[derive(Clone, Copy, Debug, PartialEq, Eq)]

src/core/vertices/get_full_adjacent_vertices_from.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use indexmap::IndexMap;
2-
use itertools::{fold, Itertools};
2+
use itertools::{Itertools, fold};
33

44
use crate::{
5-
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
6-
VertexIndex, VertexTrait,
5+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
6+
errors::HypergraphError,
77
};
88

99
#[allow(clippy::type_complexity)]

src/core/vertices/get_full_adjacent_vertices_to.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use indexmap::IndexMap;
2-
use itertools::{fold, Itertools};
2+
use itertools::{Itertools, fold};
33

44
use crate::{
5-
core::shared::Connection, errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph,
6-
VertexIndex, VertexTrait,
5+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
6+
errors::HypergraphError,
77
};
88

99
#[allow(clippy::type_complexity)]

src/core/vertices/get_full_vertex_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
3+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> Hypergraph<V, HE>
66
where

src/core/vertices/get_internal_vertex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
1+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/vertices/get_internal_vertices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
3+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> Hypergraph<V, HE>
66
where

src/core/vertices/get_vertex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
1+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/vertices/get_vertex_degree_in.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
3-
VertexTrait,
2+
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
3+
errors::HypergraphError,
44
};
55

66
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_vertex_degree_out.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
2-
core::shared::Connection, errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex,
3-
VertexTrait,
2+
HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, core::shared::Connection,
3+
errors::HypergraphError,
44
};
55

66
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_vertex_hyperedges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use itertools::Itertools;
22

33
use crate::{
4-
errors::HypergraphError, HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
4+
HyperedgeIndex, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
55
};
66

77
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/get_vertex_weight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
1+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

src/core/vertices/get_vertices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rayon::prelude::*;
22

3-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
3+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
44

55
impl<V, HE> Hypergraph<V, HE>
66
where

src/core/vertices/remove_vertex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rayon::prelude::*;
22

33
use crate::{
4-
errors::HypergraphError, HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait,
4+
HyperedgeKey, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError,
55
};
66

77
impl<V, HE> Hypergraph<V, HE>

src/core/vertices/update_vertex_weight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{errors::HypergraphError, HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait};
1+
use crate::{HyperedgeTrait, Hypergraph, VertexIndex, VertexTrait, errors::HypergraphError};
22

33
impl<V, HE> Hypergraph<V, HE>
44
where

tests/integration_contraction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
mod common;
55

66
use common::{Hyperedge, Vertex};
7-
use hypergraph::{errors::HypergraphError, HyperedgeIndex, Hypergraph, VertexIndex};
7+
use hypergraph::{HyperedgeIndex, Hypergraph, VertexIndex, errors::HypergraphError};
88

99
#[test]
1010
fn integration_contration() {

tests/integration_iterator.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@ fn integration_iterator() {
4444
vec![
4545
(hyperedge_one, vec![vertex_one, vertex_two, vertex_three]),
4646
(hyperedge_two, vec![vertex_four, vertex_five]),
47-
(
48-
hyperedge_three,
49-
vec![vertex_three, vertex_three, vertex_three]
50-
),
51-
(
52-
hyperedge_four,
53-
vec![vertex_five, vertex_four, vertex_three, vertex_one]
54-
)
47+
(hyperedge_three, vec![
48+
vertex_three,
49+
vertex_three,
50+
vertex_three
51+
]),
52+
(hyperedge_four, vec![
53+
vertex_five,
54+
vertex_four,
55+
vertex_three,
56+
vertex_one
57+
])
5558
],
5659
"should provide `into_iter()` yelding a vector of tuples of the form (hyperedge, vector of vertices)"
5760
);

tests/integration_join.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
mod common;
55

66
use common::{Hyperedge, Vertex};
7-
use hypergraph::{errors::HypergraphError, Hypergraph};
7+
use hypergraph::{Hypergraph, errors::HypergraphError};
88

99
#[test]
1010
fn integration_contration() {

tests/integration_main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
mod common;
55

66
use common::{Hyperedge, Vertex};
7-
use hypergraph::{errors::HypergraphError, HyperedgeIndex, Hypergraph, VertexIndex};
7+
use hypergraph::{HyperedgeIndex, Hypergraph, VertexIndex, errors::HypergraphError};
88

99
#[test]
1010
fn integration_main() {

0 commit comments

Comments
 (0)