Skip to content

Commit

Permalink
Fix new clippy errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Apr 28, 2021
1 parent a1fa391 commit 48db2d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bdt/_impl_attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Attribute {
if my_ctx.regulator == their_ctx.regulator && my_ctx.target == their_ctx.target {
if my_ctx.context.len() > their_ctx.context.len() {
for v in &their_ctx.context {
if my_ctx.context.iter().find(|it| *it == v).is_none() {
if !my_ctx.context.iter().any(|it| it == v) {
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/scc/algo_stability_analysis/_impl_stability_vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl StabilityVector {
///
/// If the value is already present, current vector is only copied.
pub fn add(&self, stability: Stability) -> StabilityVector {
self.clone().apply(|out| match stability {
(*self).apply(|out| match stability {
Stability::True => out.has_true = true,
Stability::False => out.has_false = true,
Stability::Unstable => out.has_unstable = true,
Expand All @@ -117,7 +117,7 @@ impl StabilityVector {
!(self.has_unstable || self.has_false || self.has_true)
}

pub fn to_json(&self) -> JsonValue {
pub fn export_json(&self) -> JsonValue {
JsonValue::new_array().apply(|array| {
if self.has_true {
array.push("true").unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl VariableStability {
for (vector, colors) in self.to_vec() {
array
.push(object! {
"vector": vector.to_json(),
"vector": vector.export_json(),
"colors": colors.approx_cardinality(),
})
.unwrap();
Expand Down

0 comments on commit 48db2d3

Please sign in to comment.