Skip to content

Commit 68bcc71

Browse files
committed
Fix linter for file streaming example
Signed-off-by: Radu Matei <[email protected]>
1 parent d36698a commit 68bcc71

File tree

1 file changed

+3
-3
lines changed
  • examples/wasi-http-streaming-file/src

1 file changed

+3
-3
lines changed

examples/wasi-http-streaming-file/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use std::{fs::File, io::Read};
33
use anyhow::Result;
44
use futures::SinkExt;
55
use spin_sdk::{
6-
http::{Fields, IncomingRequest, OutgoingResponse, ResponseOutparam},
6+
http::{Headers, IncomingRequest, OutgoingResponse, ResponseOutparam},
77
http_component,
88
};
99

10-
const CHUNK_SIZE: usize = 1 * 1024 * 1024; // 1 MB
10+
const CHUNK_SIZE: usize = 1024 * 1024; // 1 MB
1111

1212
#[http_component]
1313
async fn handler(req: IncomingRequest, res: ResponseOutparam) {
@@ -17,7 +17,7 @@ async fn handler(req: IncomingRequest, res: ResponseOutparam) {
1717
async fn stream_file(_req: IncomingRequest, res: ResponseOutparam) -> Result<()> {
1818
let response = OutgoingResponse::new(
1919
200,
20-
&Fields::new(&[(
20+
&Headers::new(&[(
2121
"content-type".to_string(),
2222
b"application/octet-stream".to_vec(),
2323
)]),

0 commit comments

Comments
 (0)