fix: clippy warnings and cargo fmt

This commit is contained in:
daragh 2024-01-04 20:51:03 +00:00
parent 6708dff2c5
commit f6e3e03eec
No known key found for this signature in database
3 changed files with 3 additions and 4 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

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