Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Nov 13, 2024
1 parent 925871b commit ee7be81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/conn/quinn/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ async fn process_web_transport(
.extensions_mut()
.remove::<Arc<Mutex<salvo_http3::server::Connection<salvo_http3::http3_quinn::Connection, Bytes>>>>()
.map(|c| {
Arc::into_inner(c).unwrap().into_inner()
Arc::into_inner(c).expect("http3 connection must exist").into_inner()
.map_err(|e| IoError::new(ErrorKind::Other, format!("failed to get conn : {}", e)))
})
.transpose()?;
stream = response
.extensions_mut()
.remove::<Arc<salvo_http3::server::RequestStream<salvo_http3::http3_quinn::BidiStream<Bytes>, Bytes>>>()
.and_then(|stream|Arc::into_inner(stream));
.and_then(Arc::into_inner);
}

let Some(conn) = conn else {
Expand Down
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/schema/enum_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cfg_feature! {
pub(crate) type_path: &'r syn::TypePath,
}

impl<'r, T> Variant for ReprVariant<'r, T>
impl<T> Variant for ReprVariant<'_, T>
where
T: ToTokens,
{
Expand Down
2 changes: 1 addition & 1 deletion crates/oapi/src/swagger_ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl From<String> for Url<'_> {
}
}

impl<'a> From<Cow<'static, str>> for Url<'a> {
impl From<Cow<'static, str>> for Url<'_> {
fn from(url: Cow<'static, str>) -> Self {
Self {
url,
Expand Down
2 changes: 1 addition & 1 deletion crates/serve-static/src/embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ where
} else {
&*decode_url_path_safely(req.uri().path())
};
let req_path = format_url_path_safely(&req_path);
let req_path = format_url_path_safely(req_path);
let mut key_path = Cow::Borrowed(&*req_path);
let mut embedded_file = T::get(req_path.as_str());
if embedded_file.is_none() {
Expand Down

0 comments on commit ee7be81

Please sign in to comment.