Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Apr 3, 2023
1 parent 4b1d608 commit 04019c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions iot_config_client/src/gateway_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ impl TryFrom<GatewayInfoProto> for GatewayInfo {
fn try_from(v: GatewayInfoProto) -> Result<Self, GatewayResolverError> {
let location = u64::from_str_radix(&v.location, 16).ok();
//TODO: use the updated proto when available
// until ready map the old proto to the new internal struct
// if we dont have a location, assume the gateway is unasserted
// and return unasserted error
// which will have a metadata field defined as an Option
// if Some(metadata) then we have an asserted gateway
// if None the gateway is unasserted
// we only return Ok(GatewayInfo) for asserted gateways
match location {
Some(_) => Ok(Self {
Expand Down
2 changes: 1 addition & 1 deletion iot_verifier/src/poc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ fn verify_witness_rssi(
witness_loc: u64,
) -> GenericVerifyResult {
let distance = match calc_distance(beacon_loc, witness_loc) {
Ok(d) => d,
Ok(v) => v,
Err(_) => return Err(InvalidReason::BadRssi),
};
let min_rcv_signal = calc_expected_rssi(
Expand Down

0 comments on commit 04019c5

Please sign in to comment.