Skip to content

Commit

Permalink
final format and clippy check after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Apr 10, 2023
1 parent 8ef0ebd commit 7d7edfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion iot_config/src/admin_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use helium_proto::{
self, AdminAddKeyReqV1, AdminKeyResV1, AdminLoadRegionReqV1, AdminLoadRegionResV1,
AdminRemoveKeyReqV1, RegionParamsReqV1, RegionParamsResV1,
},
Message,
Message, Region,
};
use sqlx::{Pool, Postgres};
use tokio::sync::watch;
Expand Down
8 changes: 5 additions & 3 deletions iot_config/src/gateway_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,19 @@ impl iot_config::Gateway for GatewayService {
.map_err(|_| Status::internal("error fetching gateway info"))
.and_then(|opt| {
opt.ok_or_else(|| {
Status::not_found(format!("gateway not found: pubkey = {}", address.to_string()))
Status::not_found(format!("gateway not found: pubkey = {address}"))
})
})
.and_then(|iot_metadata| {
iot_metadata.location.ok_or_else(|| {
Status::not_found(format!("gateway unasserted: pubkey = {}", address.to_string()))
Status::not_found(format!("gateway unasserted: pubkey = {address}"))
})
})
.and_then(|location| {
Cell::from_raw(location).map_err(|_| {
Status::internal(format!("invalid h3 index location {location} for {}", address.to_string()))
Status::internal(format!(
"invalid h3 index location {location} for {address}"
))
})
})
.map(|cell| cell.to_string())?;
Expand Down

0 comments on commit 7d7edfe

Please sign in to comment.