Rocket/codegen/tests/dynamic-paths.rs

17 lines
406 B
Rust
Raw Normal View History

#![feature(plugin, decl_macro)]
2016-09-29 03:39:14 +00:00
#![plugin(rocket_codegen)]
2017-09-10 08:19:38 +00:00
#![allow(dead_code, unused_variables)]
2016-09-29 03:39:14 +00:00
extern crate rocket;
#[get("/test/<one>/<two>/<three>")]
fn get(one: String, two: usize, three: isize) -> &'static str { "hi" }
2016-09-29 03:39:14 +00:00
2017-08-03 01:44:31 +00:00
#[get("/test/<_one>/<_two>/<__three>")]
fn ignored(_one: String, _two: usize, __three: isize) -> &'static str { "hi" }
2017-09-10 08:19:38 +00:00
#[test]
2016-09-29 03:39:14 +00:00
fn main() {
2017-08-03 01:44:31 +00:00
let _ = routes![get, ignored];
2016-09-29 03:39:14 +00:00
}