Skip to content

Commit

Permalink
Fix linter for file streaming example
Browse files Browse the repository at this point in the history
Signed-off-by: Radu Matei <[email protected]>
  • Loading branch information
radu-matei committed Oct 24, 2023
1 parent d36698a commit 68bcc71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/wasi-http-streaming-file/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::{fs::File, io::Read};
use anyhow::Result;
use futures::SinkExt;
use spin_sdk::{
http::{Fields, IncomingRequest, OutgoingResponse, ResponseOutparam},
http::{Headers, IncomingRequest, OutgoingResponse, ResponseOutparam},
http_component,
};

const CHUNK_SIZE: usize = 1 * 1024 * 1024; // 1 MB
const CHUNK_SIZE: usize = 1024 * 1024; // 1 MB

#[http_component]
async fn handler(req: IncomingRequest, res: ResponseOutparam) {
Expand All @@ -17,7 +17,7 @@ async fn handler(req: IncomingRequest, res: ResponseOutparam) {
async fn stream_file(_req: IncomingRequest, res: ResponseOutparam) -> Result<()> {
let response = OutgoingResponse::new(
200,
&Fields::new(&[(
&Headers::new(&[(
"content-type".to_string(),
b"application/octet-stream".to_vec(),
)]),
Expand Down

0 comments on commit 68bcc71

Please sign in to comment.