From cb359fe38b6b5ac97ce69cc472bfc83a57127a27 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 8 May 2019 20:10:22 -0700 Subject: [PATCH] Clean up 'conditionally-set-server-header' test. --- ...=> conditionally-set-server-header-996.rs} | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) rename core/lib/tests/{conditionally-set-server-header-997.rs => conditionally-set-server-header-996.rs} (68%) diff --git a/core/lib/tests/conditionally-set-server-header-997.rs b/core/lib/tests/conditionally-set-server-header-996.rs similarity index 68% rename from core/lib/tests/conditionally-set-server-header-997.rs rename to core/lib/tests/conditionally-set-server-header-996.rs index f8867aab..4c18ab67 100644 --- a/core/lib/tests/conditionally-set-server-header-997.rs +++ b/core/lib/tests/conditionally-set-server-header-996.rs @@ -1,27 +1,19 @@ #![feature(proc_macro_hygiene, decl_macro)] -#[macro_use] -extern crate rocket; -extern crate rocket_http; +#[macro_use] extern crate rocket; -use rocket::response::Redirect; use rocket::Response; -use rocket_http::{Header, Status}; +use rocket::http::Header; #[get("/do_not_overwrite")] -fn do_not_overwrite<'r>() -> Result, ()> { - let header = Header::new("Server", "Test"); - +fn do_not_overwrite() -> Response<'static> { Response::build() - .header(header) - .ok() + .header(Header::new("Server", "Test")) + .finalize() } #[get("/use_default")] -fn use_default<'r>() -> Result, ()> { - Response::build() - .ok() -} +fn use_default() { } mod conditionally_set_server_header { use super::*;