cargo fmt
This commit is contained in:
parent
4eb9049a1a
commit
2bbab69e94
2 changed files with 10 additions and 8 deletions
|
@ -64,8 +64,11 @@ async fn submit(input: Form<IndexForm>) -> Redirect {
|
|||
#[put("/", data = "<input>")]
|
||||
async fn submit_raw(input: Data, host: HostHeader<'_>) -> Result<String, Status> {
|
||||
let mut data = String::new();
|
||||
input.open().take(1024 * 1000)
|
||||
.read_to_string(&mut data).await
|
||||
input
|
||||
.open()
|
||||
.take(1024 * 1000)
|
||||
.read_to_string(&mut data)
|
||||
.await
|
||||
.map_err(|_| Status::InternalServerError)?;
|
||||
|
||||
let id = generate_id();
|
||||
|
@ -108,7 +111,7 @@ async fn show_paste(key: String, plaintext: IsPlaintextRequest) -> Result<Conten
|
|||
None => String::from(RawStr::from_str(entry).html_escape()),
|
||||
};
|
||||
|
||||
// Add <code> tags to enable line numbering with CSS
|
||||
// Add <code> tags to enable line numbering with CSS
|
||||
let html = format!(
|
||||
"<code>{}</code>",
|
||||
code_highlighted.replace("\n", "\n</code><code>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue