Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rust language example #195

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Conversation

voigt
Copy link
Contributor

@voigt voigt commented Aug 11, 2023

First of all, thank you for this great piece of software!

Following the rust language example lead to the following error:

cargo build --release --target wasm32-wasi
   Compiling worker v0.1.0 (/Users/c.voigt/tmp/wws/worker)
error[E0308]: mismatched types
  --> src/main.rs:7:1
   |
7  | #[worker]
   | ^^^^^^^^^
   | |
   | expected enum `Content`, found struct `String`
   | arguments to this function are incorrect
   |
   = note: expected struct `Response<Content>`
              found struct `Response<String>`
note: associated function defined here
  --> /Users/c.voigt/.cargo/git/checkouts/wasm-workers-server-167282fd3427d500/93e1165/kits/rust/src/io.rs:86:12
   |
86 |     pub fn from_response(response: Response<Content>, cache: HashMap<String, String>) -> Self {
   |            ^^^^^^^^^^^^^
   = note: this error originates in the attribute macro `worker` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `worker` due to previous error

I was able to run the example with the attached adjustments.

@vmwclabot
Copy link

@voigt, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@voigt, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@Angelmmiguel
Copy link
Contributor

Hey @voigt,

Thank you very much for your contribution 😄. I totally missed to fix that part of the example in the last update!

@vmwclabot
Copy link

@voigt, VMware has approved your signed contributor license agreement.

@Angelmmiguel Angelmmiguel self-requested a review August 16, 2023 15:03
@Angelmmiguel Angelmmiguel self-assigned this Aug 16, 2023
@Angelmmiguel Angelmmiguel added the 📝 documentation Improvements or additions to documentation label Aug 16, 2023
@Angelmmiguel Angelmmiguel merged commit c390c95 into vmware-labs:main Aug 16, 2023
5 checks passed
@Angelmmiguel
Copy link
Contributor

The changes are already in production! Thank you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📝 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants