@@ 31,6 31,11 @@ fn random() -> Redirect {
Redirect::to(uri!(turbofish: TurboFish::new(random_type())))
}
+#[get("/random_reverse")]
+fn random_reverse() -> Redirect {
+ Redirect::to(uri!(reverse_turbofish: ReverseTurboFish::new(random_type())))
+}
+
#[get("/<turbofish>", rank = 1)]
fn turbofish(turbofish: TurboFish) -> Template {
let mut context = HashMap::new();
@@ 58,7 63,14 @@ fn main() {
rocket::ignite()
.mount(
"/",
- routes![index, random, turbofish, reverse_turbofish, files],
+ routes![
+ index,
+ random,
+ random_reverse,
+ turbofish,
+ reverse_turbofish,
+ files
+ ],
)
.attach(Template::fairing())
.launch();
@@ 25,7 25,7 @@
<footer>
<a href="https://www.reddit.com/r/rust/comments/cpknjb/i_just_found_out_that_method_is_valid/ewq261j/">what?</a>
<a href="https://github.com/jplatte/turbo.fish">code.</a>
- <a href="/random">random!</a>
+ <a href="/random_reverse">random!</a>
<a href="/::<{{ guts }}>">reverse!</a>
</footer>