Skip to content

Commit

Permalink
Update Rust version and fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed May 29, 2024
1 parent 84f52c5 commit 18fefe0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ where
let message = format!("No API matches /{}", path[1..].join("/"));
return Ok(Self::top_level_error(req, StatusCode::NotFound, message));
};
if module.versions.get(&version).is_none() {
if module.versions.contains_key(&version) {
// This version is not supported, list suported versions.
return Ok(html! {
"Unsupported version v" (version) ". Supported versions are:"
Expand Down
4 changes: 2 additions & 2 deletions src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,13 @@ pub(crate) fn health_check_response<H: HealthCheck, VER: StaticVersionType>(
///
/// Given a handler, this function can be used to derive a new, type-erased [HealthCheckHandler]
/// that takes only [RequestParams] and returns a generic [tide::Response].
pub(crate) fn health_check_handler<State, H, VER: StaticVersionType>(
pub(crate) fn health_check_handler<State, H, VER>(
handler: impl 'static + Send + Sync + Fn(&State) -> BoxFuture<H>,
) -> HealthCheckHandler<State>
where
State: 'static + Send + Sync,
H: 'static + HealthCheck,
VER: 'static + Send + Sync,
VER: 'static + Send + Sync + StaticVersionType,
{
Box::new(move |req, state| {
let accept = req.accept().unwrap_or_else(|_| {
Expand Down

0 comments on commit 18fefe0

Please sign in to comment.