You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For folks who enable clippy::pedantic, you'll get at least 3 lint warnings:
clippy::unnecessary_wraps
Most code samples never return an Error, making Result<Response, Error> unnecessary.
The macro could allow a return value of pure Response.
clippy::needless_pass_by_value
The request object (req: Request) does not always need ownership.
The macro could allow a parameter of &Request.
clippy::inline_always
This is a false-positive, so probably the right thing to do is just tell users using pedantic to ignore it.
It's possible to work around these issues by following the instructions to bootstrap without the macro, or by using #[allow(clippy::lint_warning)] but figured I'd share the feedback anyway and see if any of these were intentional or easy to improve upon or if it's worth documenting using stricter lints with the Fastly Rust API.
Thanks!
The text was updated successfully, but these errors were encountered:
Most examples of getting started with Rust and Fastly introduce the following pattern:
For folks who enable
clippy::pedantic
, you'll get at least 3 lint warnings:clippy::unnecessary_wraps
Most code samples never return an
Error
, makingResult<Response, Error>
unnecessary.The macro could allow a return value of pure
Response
.clippy::needless_pass_by_value
The request object (
req: Request
) does not always need ownership.The macro could allow a parameter of
&Request
.clippy::inline_always
This is a false-positive, so probably the right thing to do is just tell users using pedantic to ignore it.
It's possible to work around these issues by following the instructions to bootstrap without the macro, or by using
#[allow(clippy::lint_warning)]
but figured I'd share the feedback anyway and see if any of these were intentional or easy to improve upon or if it's worth documenting using stricter lints with the Fastly Rust API.Thanks!
The text was updated successfully, but these errors were encountered: