~jplatte/turbo.fish

69f909f0f8a30fb3c748fecac68ae9fa139e4bdd — Jonas Platte 1 year, 1 month ago 3636892
Implement random_reverse
2 files changed, 14 insertions(+), 2 deletions(-)

M src/main.rs
M templates/reverse_turbofish.tera
M src/main.rs => src/main.rs +13 -1
@@ 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();

M templates/reverse_turbofish.tera => templates/reverse_turbofish.tera +1 -1
@@ 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>