Add more comments
This commit is contained in:
parent
2c1571881e
commit
4fde268117
3 changed files with 21 additions and 2 deletions
13
src/main.rs
13
src/main.rs
|
@ -1,5 +1,4 @@
|
|||
#![feature(proc_macro_hygiene, decl_macro)]
|
||||
#![feature(uniform_paths)]
|
||||
#![feature(type_alias_enum_variants)]
|
||||
|
||||
#[macro_use] extern crate lazy_static;
|
||||
|
@ -28,6 +27,10 @@ use rocket::http::ContentType;
|
|||
|
||||
use std::io::Read;
|
||||
|
||||
///
|
||||
/// Homepage
|
||||
///
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "index.html")]
|
||||
struct Index {}
|
||||
|
@ -38,6 +41,10 @@ fn index() -> Index {
|
|||
}
|
||||
|
||||
|
||||
///
|
||||
/// Submit Paste
|
||||
///
|
||||
|
||||
#[derive(FromForm)]
|
||||
struct IndexForm {
|
||||
val: String
|
||||
|
@ -63,6 +70,10 @@ fn submit_raw(input: Data, host: HostHeader) -> std::io::Result<String> {
|
|||
}
|
||||
|
||||
|
||||
///
|
||||
/// Show paste page
|
||||
///
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "paste.html")]
|
||||
struct Render {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue