Skip to content

failed to build on windows 10 #168

@laoshaw

Description

@laoshaw

it's built on linux just fine, but very hard to cross compile for windows from Linux, so I just installed rust on windows and start building, then it failed:

   Compiling http-server v0.7.4 (C:\Users\Test\rust\http-server)
error[E0515]: cannot return value referencing local variable `bytes`
  --> src\utils\url_encode.rs:50:13
   |
39 |                             &bytes
   |                             ------ `bytes` is borrowed here
...
50 |             std::iter::once("/").chain(segment)
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a value referencing data owned by the current function
   |
   = help: use `.collect()` to allocate the iterator

For more information about this error, try `rustc --explain E0515`.
error: could not compile `http-server` due to previous error
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions