awslabs / aws-lambda-rust-runtime

A Rust runtime for AWS Lambda
Apache License 2.0
3.29k stars 335 forks source link

Fixed clippy warnings in lambda-events #910

Closed rimutaka closed 1 month ago

rimutaka commented 1 month ago

A minor fix to remove Clippy warnings in lambda-events:

this expression creates a reference which is immediately dereferenced by the compiler
for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
`#[warn(clippy::needless_borrow)]` on by defaultclippy[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A%2F%2F%2Fhome%2Fmx%2Fprojects%2Fgh-forks%2Faws-lambda-rust-runtime-fork%2Flambda-events%2Fsrc%2Fevent%2Fcloudwatch_events%2Fcloudtrail.rs)
cloudtrail.rs(103, 59): change this to: `output.as_bytes()`

Weirdly enough, the warnings came up in VSCode, but not in the CLI. @martinjlowm, please take a look if you get a chance in case I'm breaking something with this fix. It was your code.

🔏 By submitting this pull request