Page MenuHomePhabricator

[identity] general cleanup
ClosedPublic

Authored by varun on Aug 15 2023, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 16, 2:15 AM
Unknown Object (File)
Sun, Feb 16, 2:15 AM
Unknown Object (File)
Sun, Feb 16, 2:15 AM
Unknown Object (File)
Sun, Feb 16, 2:15 AM
Unknown Object (File)
Sun, Feb 16, 2:11 AM
Unknown Object (File)
Jan 11 2025, 12:51 AM
Unknown Object (File)
Jan 10 2025, 2:48 PM
Unknown Object (File)
Jan 10 2025, 2:48 PM
Subscribers

Details

Summary

i noticed some incorrect patterns in our code using cargo clippy. in particular, we should use ok_or_else instead of ok_or when we're calling a function (lazy evaluation), avoid referencing when the compiler will immediately dereference anyway, and use Box to wrap large enum variants.

Test Plan

cargo build

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Aug 15 2023, 8:56 PM
services/identity/src/client_service.rs
49–50 ↗(On Diff #29931)

Just curious: Didn't Clippy also notice the fat type in the database Error type for AwsSdk?
See this comment

This revision is now accepted and ready to land.Aug 16 2023, 12:14 AM
services/identity/src/client_service.rs
49–50 ↗(On Diff #29931)

hmm no it didn't. strange

This revision was automatically updated to reflect the committed changes.