Skip to content

Commit

Permalink
chore: Updates for rust 1.73.0 (#465)
Browse files Browse the repository at this point in the history
Note: this does not change the included Rust version (updates to Dockerfile or
.circleci/config.yml). These are just the updates that rust 1.73 clippy suggested
  • Loading branch information
jrconlin authored Oct 6, 2023
1 parent 6da8c45 commit bd8a428
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 39 deletions.
60 changes: 30 additions & 30 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions autoconnect/autoconnect-common/src/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ impl BroadcastChangeTracker {
pub fn missing_broadcasts(&self, broadcasts: &[Broadcast]) -> Vec<Broadcast> {
broadcasts
.iter()
.filter_map(|b| {
.filter(|&b| {
self.broadcast_registry
.lookup_key(&b.broadcast_id)
.is_none()
.then(|| b.clone().error())
})
.map(|b| b.clone().error())
.collect()
}
}
Expand Down
4 changes: 2 additions & 2 deletions autoendpoint/src/routers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ impl RouterError {
// callbacks, whereas some are emitted via this method. These 2 should
// be consoliated: https://mozilla-hub.atlassian.net/browse/SYNC-3695
let err = match self {
RouterError::Adm(e) if matches!(e, AdmError::InvalidProfile | AdmError::NoProfile) => {
RouterError::Adm(AdmError::InvalidProfile | AdmError::NoProfile) => {
"notification.bridge.error.adm.profile"
}
RouterError::Apns(ApnsError::SizeLimit(_)) => {
"notification.bridge.error.apns.oversized"
}
RouterError::Fcm(e) if matches!(e, FcmError::InvalidAppId(_) | FcmError::NoAppId) => {
RouterError::Fcm(FcmError::InvalidAppId(_) | FcmError::NoAppId) => {
"notification.bridge.error.fcm.badappid"
}
RouterError::TooMuchData(_) => "notification.bridge.error.too_much_data",
Expand Down
1 change: 0 additions & 1 deletion autopush/src/db/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ pub fn lookup_user(
let uaid2 = *uaid;
let router_table = router_table_name.to_string();
let messages_tables = message_table_names.to_vec();
let connected_at = connected_at;
let router_url = router_url.to_string();
let response = response.and_then(move |data| -> MyFuture<_> {
let mut hello_response = HelloResponse {
Expand Down
1 change: 0 additions & 1 deletion autopush/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ impl DynamoStorage {
let ddb = self.ddb.clone();
let router_url = router_url.to_string();
let router_table_name = self.router_table_name.clone();
let connected_at = connected_at;

response.and_then(move |(mut hello_response, user_opt)| {
trace!(
Expand Down
6 changes: 3 additions & 3 deletions autopush/src/server/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ impl Future for Dispatch {
Some(path) if path.starts_with("/status") || path == "/__heartbeat__" => {
RequestType::Status
}
Some(path) if path == "/__lbheartbeat__" => RequestType::LBHeartBeat,
Some(path) if path == "/__version__" => RequestType::Version,
Some("/__lbheartbeat__") => RequestType::LBHeartBeat,
Some("/__version__") => RequestType::Version,
// legacy:
Some(path) if path.starts_with("/v1/err/crit") => RequestType::LogCheck,
// standardized:
Some(path) if path == ("/__error__") => RequestType::LogCheck,
Some("/_error") => RequestType::LogCheck,
_ => {
debug!("unknown http request {:?}", req);
return Err(
Expand Down

0 comments on commit bd8a428

Please sign in to comment.