Skip to content

Commit 22c552d

Browse files
committed
Apply latest clippy rules.
1 parent 80d968c commit 22c552d

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

src/_impl_fn_update.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,10 +1124,7 @@ mod tests {
11241124
",
11251125
)
11261126
.unwrap();
1127-
let args = bn
1128-
.variables()
1129-
.map(|it| FnUpdate::mk_var(it))
1130-
.collect::<Vec<_>>();
1127+
let args = bn.variables().map(FnUpdate::mk_var).collect::<Vec<_>>();
11311128
assert_eq!(
11321129
FnUpdate::try_from_str("a & b & c", &bn).unwrap(),
11331130
FnUpdate::mk_conjunction(&args)

src/biodivine_std/structs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ mod tests {
101101
assert!(!state.get_bit(3));
102102
assert!(state.get_bit(4));
103103
let flipped = state.flip_bit(3);
104-
assert_eq!(0b11110 as usize, flipped.into());
104+
assert_eq!(0b11110_usize, flipped.into());
105105
}
106106

107107
#[test]

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! - Full SBML-qual support for import/export as well as custom string format `.aeon`.
55
//! - Fully symbolic asynchronous state-space generator using BDDs (great overall performance).
66
//! - Semi-symbolic state-space generator, using BDDs used only for the network parameters
7-
//! (allows state-level parallelism for smaller networks).
7+
//! (allows state-level parallelism for smaller networks).
88
//!
99
//! For a quick introduction to Boolean networks and their symbolic manipulation, you can
1010
//! check out our [tutorial module](./tutorial/index.html).
@@ -155,10 +155,10 @@ pub struct Parameter {
155155
/// Every regulation can be *monotonous*, and can be set as *observable*:
156156
///
157157
/// - Monotonicity is either *positive* or *negative* and signifies that the influence of the
158-
/// `regulator` on the `target` has to *increase* or *decrease* the `target` value respectively.
158+
/// `regulator` on the `target` has to *increase* or *decrease* the `target` value respectively.
159159
/// - If observability is set to `true`, the `regulator` *must* have influence on the outcome
160-
/// of the `target` update function in *some* context. If set to false, this is not enforced
161-
/// (i.e. the `regulator` *can* have an influence on the `target`, but it is not required).
160+
/// of the `target` update function in *some* context. If set to false, this is not enforced
161+
/// (i.e. the `regulator` *can* have an influence on the `target`, but it is not required).
162162
///
163163
/// Regulations can be represented as strings in the
164164
/// form `"regulator_name 'relationship' target_name"`. The 'relationship' starts with `-`, which

src/symbolic_async_graph/_impl_symbolic_async_graph.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ impl SymbolicAsyncGraph {
334334
///
335335
/// *Note:* The reason this method takes a slice and not, e.g., a `HashMap` is that:
336336
/// - If constant, slices are much easier to write in code (i.e. we can write
337-
/// `graph.mk_subspace(&[(a, true), (b, false)])` -- there is no such syntax for a map).
337+
/// `graph.mk_subspace(&[(a, true), (b, false)])` -- there is no such syntax for a map).
338338
/// - This is already used by the internal BDD API, so the conversion is less involved.
339339
pub fn mk_subspace(&self, values: &[(VariableId, bool)]) -> GraphColoredVertices {
340340
let partial_valuation: Vec<(BddVariable, bool)> = values
@@ -603,12 +603,12 @@ impl SymbolicAsyncGraph {
603603
/// checking algorithms:
604604
/// - The two networks have the same variables.
605605
/// - All parameters used in the subnetwork must also be declared in the
606-
/// main network (with the same arity).
606+
/// main network (with the same arity).
607607
/// - The regulations are identical in both networks (including monotonicity/observability).
608608
/// - If the main network has an update function, the subnetwork must have the same
609-
/// update function (tested using the abstract syntax tree, not semantics).
609+
/// update function (tested using the abstract syntax tree, not semantics).
610610
/// - If the main network has an erased update function, the subnetwork can have
611-
/// a fully specified function (no parameters) instead.
611+
/// a fully specified function (no parameters) instead.
612612
/// - The subnetwork and main network are consistent with the shared regulatory graph.
613613
///
614614
/// If all of these conditions are met, the function returns a `ColorSet` representing all
@@ -830,7 +830,7 @@ impl SymbolicAsyncGraph {
830830
///
831831
/// The `graph` is considered compatible if:
832832
/// 1. All parameters which appear in `colors` also appear in this graph under the same name
833-
/// (parameters not used in `colors` do not matter).
833+
/// (parameters not used in `colors` do not matter).
834834
/// 2. The internal ordering of symbolic parameter variables is equivalent between graphs.
835835
///
836836
/// At the moment, condition (2) depends on network structure and is hard to directly
@@ -853,7 +853,7 @@ impl SymbolicAsyncGraph {
853853
///
854854
/// The `graph` is considered compatible if:
855855
/// 1. All variables which appear in `vertices` also appear in this graph under the same name
856-
/// (variables not used in `vertices` do not matter).
856+
/// (variables not used in `vertices` do not matter).
857857
/// 2. The internal ordering of symbolic variables is equivalent between the two graphs.
858858
///
859859
/// At the moment, variables are by default ordered alphabetically, hence condition (2)
@@ -876,7 +876,7 @@ impl SymbolicAsyncGraph {
876876
///
877877
/// The `graph` is considered compatible if:
878878
/// 1. All parameters and state variables which appear in `set` also appear in this graph
879-
/// under the same name (variables not used in `set` do not matter).
879+
/// under the same name (variables not used in `set` do not matter).
880880
/// 2. The internal ordering of relevant symbolic variables is equivalent between graphs.
881881
///
882882
/// At the moment, condition (2) depends on network structure and is hard to directly

src/symbolic_async_graph/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ mod tests {
233233
universe = universe.minus(&scc);
234234
components.push(scc);
235235
}
236-
return components;
236+
components
237237
}
238238
let bn = BooleanNetwork::try_from(
239239
r"

0 commit comments

Comments
 (0)