这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/docs/languages/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ In this example, the worker will get a request and print all the related informa
use wasm_workers_rs::{
worker,
http::{self, HeaderValue, Request, Response},
Content,
};

#[worker]
fn reply(req: Request<String>) -> Result<Response<String>> {
fn reply(req: Request<String>) -> Result<Response<Content>> {
// Applied changes here to use the Response method. This requires changes
// on signature and how it returns the data.
let response = format!(
Expand Down