Skip to content

Commit 8edf108

Browse files
committed
Split out http conversions in new module
Signed-off-by: Ryan Levick <[email protected]>
1 parent 42b7610 commit 8edf108

File tree

6 files changed

+418
-401
lines changed

6 files changed

+418
-401
lines changed

sdk/rust/macro/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn http_component(_attr: TokenStream, item: TokenStream) -> TokenStream {
1717
impl self::exports::fermyon::spin::inbound_http::Guest for Spin {
1818
fn handle_request(req: self::exports::fermyon::spin::inbound_http::Request) -> self::exports::fermyon::spin::inbound_http::Response {
1919
let req: ::spin_sdk::http::Request = ::std::convert::Into::into(req);
20-
let resp = match ::spin_sdk::http::TryFromRequest::try_from_request(req) {
20+
let resp = match ::spin_sdk::http::conversions::TryFromRequest::try_from_request(req) {
2121
::std::result::Result::Ok(req) => ::spin_sdk::http::IntoResponse::into_response(super::#func_name(req)),
2222
::std::result::Result::Err(e) => ::spin_sdk::http::IntoResponse::into_response(e),
2323
};
@@ -126,7 +126,7 @@ pub fn redis_component(_attr: TokenStream, item: TokenStream) -> TokenStream {
126126
/// ```
127127
///
128128
/// The `request` param can be anything that implements `spin_sdk::wasi_http::conversions::TryFromIncomingRequest`.
129-
/// This includes all types that implement `spin_sdk::http::TryIntoRequest` (which may be more convenient to use
129+
/// This includes all types that implement `spin_sdk::http::conversions::TryIntoRequest` (which may be more convenient to use
130130
/// when you don't need streaming request bodies).
131131
#[proc_macro_attribute]
132132
pub fn wasi_http_component(_attr: TokenStream, item: TokenStream) -> TokenStream {

0 commit comments

Comments
 (0)