Use dereferencing for request parameters
This commit is contained in:
parent
4fde268117
commit
707b5b16e7
2 changed files with 20 additions and 2 deletions
|
@ -63,7 +63,7 @@ fn submit_raw(input: Data, host: HostHeader) -> std::io::Result<String> {
|
|||
|
||||
let paste = store_paste(data);
|
||||
|
||||
match host.0 {
|
||||
match *host {
|
||||
Some(host) => Ok(format!("https://{}/{}", host, paste)),
|
||||
None => Ok(paste)
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ fn render(key: String, plaintext: IsPlaintextRequest) -> Option<Content<String>>
|
|||
// again so we can hold this for as long as we want
|
||||
let entry = get_paste(key)?;
|
||||
|
||||
if plaintext.0 {
|
||||
if *plaintext {
|
||||
Some(Content(ContentType::Plain, entry))
|
||||
} else {
|
||||
Some(Content(ContentType::HTML, Render {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue