From 08624ddf36ca9cbc0c1cebfd0b496409a907d51b Mon Sep 17 00:00:00 2001 From: Felix Prillwitz Date: Mon, 16 Dec 2024 00:19:21 +0100 Subject: [PATCH] fix typo and `find_next` --- connect/src/context_resolver.rs | 2 +- connect/src/state/context.rs | 2 +- core/src/dealer/protocol.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/connect/src/context_resolver.rs b/connect/src/context_resolver.rs index 01bc8c2a..7a8b56f1 100644 --- a/connect/src/context_resolver.rs +++ b/connect/src/context_resolver.rs @@ -207,7 +207,7 @@ impl ContextResolver { fn find_next(&self) -> Option<(&ResolveContext, &str, usize)> { let mut idx = 0; loop { - let next = self.queue.front()?; + let next = self.queue.get(idx)?; match next.resolve_uri() { None if idx < self.queue.len() => { warn!("skipped {idx} because of no valid resolve_uri: {next}"); diff --git a/connect/src/state/context.rs b/connect/src/state/context.rs index c0f95b69..27527c68 100644 --- a/connect/src/state/context.rs +++ b/connect/src/state/context.rs @@ -63,7 +63,7 @@ fn page_url_to_uri(page_url: &str) -> String { let split = if let Some(rest) = page_url.strip_prefix("hm://") { rest.split('/') } else { - warn!("page_url didn't started with hm://. got page_url: {page_url}"); + warn!("page_url didn't start with hm://. got page_url: {page_url}"); page_url.split('/') }; diff --git a/core/src/dealer/protocol.rs b/core/src/dealer/protocol.rs index d450dfa7..c774a119 100644 --- a/core/src/dealer/protocol.rs +++ b/core/src/dealer/protocol.rs @@ -174,9 +174,9 @@ fn handle_transfer_encoding( ) -> Result, Error> { let encoding = headers.get("Transfer-Encoding").map(String::as_str); if let Some(encoding) = encoding { - trace!("message was send with {encoding} encoding "); + trace!("message was sent with {encoding} encoding "); } else { - trace!("message was send with no encoding "); + trace!("message was sent with no encoding "); } if !matches!(encoding, Some("gzip")) {