Merge pull request #915 from DaraghD/clippy

fix: clippy warnings
This commit is contained in:
Jeremiah Senkpiel 2024-01-04 17:12:04 -08:00 committed by GitHub
commit b32f680d5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View File

@ -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() {

View File

@ -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()
}

View File

@ -1,6 +1,5 @@
mod test_utils;
use http_types::headers::HeaderName;
use std::convert::TryInto;
use test_utils::ServerTestingExt;
use tide::Middleware;
@ -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)
}
}

View File

@ -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> {