Get rid of 'Dapp is being downloaded' page

This commit is contained in:
Tomasz Drwięga
2016-09-06 22:12:52 +02:00
parent 9655920896
commit 6f88b7f084
8 changed files with 145 additions and 76 deletions

View File

@@ -20,15 +20,20 @@ use hyper::{header, server, Decoder, Encoder, Next};
use hyper::net::HttpStream;
use hyper::status::StatusCode;
#[derive(Clone)]
pub struct Redirection {
to_url: String
}
impl Redirection {
pub fn new(url: &str) -> Box<Self> {
Box::new(Redirection {
pub fn new(url: &str) -> Self {
Redirection {
to_url: url.to_owned()
})
}
}
pub fn boxed(url: &str) -> Box<Self> {
Box::new(Self::new(url))
}
}