mirror of https://github.com/rwf2/Rocket.git
Fix and update benchmarks.
This commit is contained in:
parent
8bf6aa2068
commit
e7e84a6d41
|
@ -1,3 +1,4 @@
|
|||
#![feature(test)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
#[macro_use] extern crate rocket;
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
#![feature(test)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
use rocket::config::{Environment, Config, LoggingLevel};
|
||||
|
||||
#[get("/", format = "application/json")]
|
||||
#[get("/", format = "application/json", rank = 1)]
|
||||
fn get() -> &'static str { "json" }
|
||||
|
||||
#[get("/", format = "text/html")]
|
||||
#[get("/", format = "text/html", rank = 2)]
|
||||
fn get2() -> &'static str { "html" }
|
||||
|
||||
#[get("/", format = "text/plain")]
|
||||
#[get("/", format = "text/plain", rank = 3)]
|
||||
fn get3() -> &'static str { "plain" }
|
||||
|
||||
#[post("/", format = "application/json")]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![feature(test)]
|
||||
#![feature(proc_macro_hygiene)]
|
||||
// #![feature(alloc_system)]
|
||||
// extern crate alloc_system;
|
||||
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
|
@ -28,8 +27,8 @@ fn index_b() -> &'static str { "index" }
|
|||
#[get("/c")]
|
||||
fn index_c() -> &'static str { "index" }
|
||||
|
||||
#[get("/<a>")]
|
||||
fn index_dyn_a(a: &RawStr) -> &'static str { "index" }
|
||||
#[get("/<_a>")]
|
||||
fn index_dyn_a(_a: &RawStr) -> &'static str { "index" }
|
||||
|
||||
fn hello_world_rocket() -> rocket::Rocket {
|
||||
let config = Config::build(Environment::Production).log_level(LoggingLevel::Off);
|
||||
|
|
Loading…
Reference in New Issue