Skip to content

Commit

Permalink
fix: clippy warnings and cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
DaraghD committed Jan 4, 2024
1 parent 6708dff commit f6e3e03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 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
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 f6e3e03

Please sign in to comment.