Skip to content

lambda_http fails to compile with default-features = false #697

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

Closed
jdisanti opened this issue Sep 15, 2023 · 2 comments · Fixed by #698
Closed

lambda_http fails to compile with default-features = false #697

jdisanti opened this issue Sep 15, 2023 · 2 comments · Fixed by #698

Comments

@jdisanti
Copy link

If you depend on lambda_http 0.8.1 with default features set to false, then the following compile errors occur:

    Checking lambda_http v0.8.1
error[E0004]: non-exhaustive patterns: type `&LambdaRequest` is non-empty
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lambda_http-0.8.1/src/request.rs:54:15
   |
54 |         match self {
   |               ^^^^
   |
note: `LambdaRequest` defined here
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lambda_http-0.8.1/src/request.rs:38:10
   |
38 | pub enum LambdaRequest {
   |          ^^^^^^^^^^^^^
   = note: the matched value is of type `&LambdaRequest`
   = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
   |
54 ~         match self {
55 +             _ => todo!(),
56 +         }
   |

error[E0004]: non-exhaustive patterns: type `&RequestOrigin` is non-empty
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lambda_http-0.8.1/src/response.rs:64:15
   |
64 |         match request_origin {
   |               ^^^^^^^^^^^^^^
   |
note: `RequestOrigin` defined here
  --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lambda_http-0.8.1/src/request.rs:73:10
   |
73 | pub enum RequestOrigin {
   |          ^^^^^^^^^^^^^
   = note: the matched value is of type `&RequestOrigin`
   = note: references are always considered inhabited
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
   |
64 ~         match request_origin {
65 +             _ => todo!(),
66 +         }
   |

For more information about this error, try `rustc --explain E0004`.
@calavera
Copy link
Contributor

This kinda makes sense. You need at least 1 of the features enabled for the crate to work. Feel free to open a PR if you have suggestions on how to fix that.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

Successfully merging a pull request may close this issue.

2 participants