File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ test-log = { version = "0.2", features = ["trace"] }
64
64
test-programs = { path = " test-programs" }
65
65
test-programs-artifacts = { path = " test-programs/artifacts" }
66
66
ureq = " 2.12.1"
67
- wasi = " 0.13.1 "
67
+ wasi = " 0.14.0 "
68
68
wasmtime = " 26"
69
69
wasmtime-cli = " 26"
70
70
wasmtime-wasi = " 26"
Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ pub(crate) fn header_map_to_wasi(header_map: &HeaderMap) -> Fields {
22
22
let wasi_fields = Fields :: new ( ) ;
23
23
for ( key, value) in header_map {
24
24
// Unwrap because `HeaderMap` has already validated the headers.
25
- // TODO: Remove the `to_owned()` calls after bytecodealliance/wit-bindgen#1102.
26
25
wasi_fields
27
- . append ( & key. as_str ( ) . to_owned ( ) , & value. as_bytes ( ) . to_owned ( ) )
26
+ . append ( & key. as_str ( ) , & value. as_bytes ( ) )
28
27
. unwrap_or_else ( |err| panic ! ( "header named {key}: {err:?}" ) ) ;
29
28
}
30
29
wasi_fields
Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ pub(crate) fn try_into_outgoing<T>(request: Request<T>) -> Result<(OutgoingReque
41
41
42
42
// Set the url path + query string
43
43
if let Some ( p_and_q) = parts. uri . path_and_query ( ) {
44
- // TODO: Change the `to_string()` to `as_str()` after bytecodealliance/wit-bindgen#1102.
45
44
wasi_req
46
- . set_path_with_query ( Some ( & p_and_q. to_string ( ) ) )
45
+ . set_path_with_query ( Some ( & p_and_q. as_str ( ) ) )
47
46
. map_err ( |( ) | {
48
47
Error :: other ( format ! ( "path and query rejected by wasi-http {p_and_q:?}" ) )
49
48
} ) ?;
Original file line number Diff line number Diff line change @@ -107,13 +107,9 @@ impl Responder {
107
107
108
108
// Automatically add a Content-Length header.
109
109
if let Some ( len) = body. len ( ) {
110
- // TODO: Remove the `to_owned()` calls after bytecodealliance/wit-bindgen#1102.
111
110
let mut buffer = itoa:: Buffer :: new ( ) ;
112
111
wasi_headers
113
- . append (
114
- & CONTENT_LENGTH . as_str ( ) . to_owned ( ) ,
115
- & buffer. format ( len) . to_owned ( ) . into_bytes ( ) ,
116
- )
112
+ . append ( & CONTENT_LENGTH . as_str ( ) , & buffer. format ( len) . as_bytes ( ) )
117
113
. unwrap ( ) ;
118
114
}
119
115
You can’t perform that action at this time.
0 commit comments