Skip to content

Commit

Permalink
Merge pull request #915 from DaraghD/clippy
Browse files Browse the repository at this point in the history
fix: clippy warnings
  • Loading branch information
Fishrock123 authored Jan 5, 2024
2 parents a752efc + f6e3e03 commit b32f680
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const INTERNAL_SERVER_ERROR_HTML_PAGE: &str = "<html><body>
#[async_std::main]
async fn main() -> Result<()> {
femme::start();
let mut app = tide::with_state(UserDatabase::default());
let mut app = tide::with_state(UserDatabase);

app.with(After(|response: Response| async move {
let response = match response.status() {
Expand Down
2 changes: 1 addition & 1 deletion src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<State: Clone + Send + Sync + 'static> Router<State> {
) {
self.method_map
.entry(method)
.or_insert_with(MethodRouter::new)
.or_default()
.add(path, ep)
.unwrap()
}
Expand Down
3 changes: 1 addition & 2 deletions tests/route_middleware.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mod test_utils;
use http_types::headers::HeaderName;
use std::convert::TryInto;
use test_utils::ServerTestingExt;
use tide::Middleware;

Expand All @@ -9,7 +8,7 @@ struct TestMiddleware(HeaderName, &'static str);

impl TestMiddleware {
fn with_header_name(name: &'static str, value: &'static str) -> Self {
Self(name.try_into().unwrap(), value)
Self(name.into(), value)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ mod unix_tests {
use async_std::task;
use http_types::{url::Url, Request};
use std::time::Duration;
use tide::Method;
use tempfile::tempdir;
use tide::Method;

#[test]
fn hello_unix_world() -> Result<(), http_types::Error> {
Expand Down

0 comments on commit b32f680

Please sign in to comment.