Skip to content

Commit

Permalink
update to account for proto treating sp override as a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Feb 12, 2025
1 parent e758b44 commit 57df94e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions hex_assignments/src/assignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ impl From<Assignment> for ProtoAssignment {
}
}

impl Into<bool> for Assignment {
fn into(self) -> bool {
match self {
Assignment::A => true,
Assignment::B => true,
Assignment::C => false,
}
}
}

impl From<Assignment> for i32 {
fn from(assignment: Assignment) -> i32 {
ProtoAssignment::from(assignment) as i32
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/tests/integrations/boosting_oracles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async fn test_footfall_and_urbanization_report(pool: PgPool) -> anyhow::Result<(
urbanized.insert(hex_cell(&hex.location), hex.urbanized().into());
footfall.insert(hex_cell(&hex.location), hex.footfall().into());
landtype.insert(hex_cell(&hex.location), hex.landtype().into());
if hex.service_provider_override == Assignment::A as i32 {
if hex.service_provider_override {
service_provider_override.insert(hex_cell(&hex.location));
}
}
Expand Down

0 comments on commit 57df94e

Please sign in to comment.