2017-08-29 03:14:59 +00:00
|
|
|
#![feature(plugin, decl_macro)]
|
2017-01-31 10:01:30 +00:00
|
|
|
#![plugin(rocket_codegen)]
|
2017-09-10 08:19:38 +00:00
|
|
|
#![allow(dead_code, unused_variables)]
|
2017-01-31 10:01:30 +00:00
|
|
|
|
|
|
|
extern crate rocket;
|
|
|
|
|
|
|
|
#[get("/one")]
|
|
|
|
fn one() { }
|
|
|
|
|
|
|
|
#[get("/two")]
|
|
|
|
fn two() { }
|
|
|
|
|
|
|
|
#[get("/three")]
|
|
|
|
fn three() { }
|
|
|
|
|
|
|
|
#[get("/four")]
|
|
|
|
fn four() { }
|
|
|
|
|
2017-09-10 08:19:38 +00:00
|
|
|
#[test]
|
2017-01-31 10:01:30 +00:00
|
|
|
fn main() {
|
|
|
|
let instance = rocket::ignite()
|
|
|
|
.mount("/", routes![one]);
|
|
|
|
|
|
|
|
let other = instance.mount("/", routes![two]);
|
|
|
|
other.mount("/", routes![three])
|
|
|
|
.mount("/", routes![four]);
|
|
|
|
|
|
|
|
rocket::ignite()
|
|
|
|
.mount("/", routes![one])
|
|
|
|
.mount("/", routes![two])
|
|
|
|
.mount("/", routes![three])
|
|
|
|
.mount("/", routes![four]);
|
|
|
|
|
|
|
|
let a = rocket::ignite()
|
|
|
|
.mount("/", routes![one])
|
|
|
|
.mount("/", routes![two]);
|
|
|
|
|
|
|
|
let b = a.mount("/", routes![three])
|
|
|
|
.mount("/", routes![four]);
|
|
|
|
}
|