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

rustFlake: doesn't fail on reported cargo clippy AND cargo build warnings #33

Open
bladyjoker opened this issue Feb 8, 2024 · 1 comment
Labels

Comments

@bladyjoker
Copy link
Contributor

Original: mlabs-haskell/lambda-buffers#165

warning: very complex type used. Consider factoring parts into `type` definitions
  --> src/indexer/callback.rs:22:5
   |
22 |     Arc<dyn Fn(Event) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + Sync>> + Send + Sync>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
   = note: `#[warn(clippy::type_complexity)]` on by default
warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`
  --> src/indexer/callback.rs:43:9
   |
43 | /         rt.block_on(handle_event(input, |ev: Event| f(ev), &retry_policy, utils))
44 | |           .or_else(|err| {
45 | |             event!(Level::ERROR, label=%Events::EventHandlerFailure, ?err);
46 | |             Err(err)
47 | |           })
   | |____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
   = note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
   |
44 ~           .map_err(|err| {
45 |             event!(Level::ERROR, label=%Events::EventHandlerFailure, ?err);
46 ~             err
   |
@bladyjoker bladyjoker added the rust label Feb 8, 2024
@bladyjoker bladyjoker changed the title rustFlake: rustFlake doesn't fail on reported cargo clippy AND cargo build warnings rustFlake: doesn't fail on reported cargo clippy AND cargo build warnings Feb 8, 2024
@bladyjoker
Copy link
Contributor Author

@szg251 is there an easy way to fail builds when any warning is issued? That's what we do in other places.

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

No branches or pull requests

1 participant