Page MenuHomePhabricator

[rust] Formatting and clippy fixes
ClosedPublic

Authored by michal on Jan 16 2024, 6:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 3:01 PM
Unknown Object (File)
Wed, Nov 20, 3:01 PM
Unknown Object (File)
Oct 22 2024, 1:06 PM
Unknown Object (File)
Oct 22 2024, 9:00 AM
Unknown Object (File)
Oct 22 2024, 5:31 AM
Unknown Object (File)
Oct 22 2024, 5:31 AM
Unknown Object (File)
Oct 6 2024, 3:25 AM
Unknown Object (File)
Oct 6 2024, 1:26 AM
Subscribers

Details

Summary

ENG-6452 : Lint staged fails on Rust formatting

After nix update, rustfmt started formatting let else which meant that lint-staged was failing. I took this opportunity to also fix some low-hanging clippy fixes.

Test Plan

In each cargo project:

  • Run cargo fmt
  • Run cargo clippy
    • If there are any quick and safe fixes do them
    • If I applied any clippy fixes I also run cargo check && cargo check --tests after that

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

A few arguments were .into() into themselves so the function call was removed. A few unused imports were removed.

services/backup/src/http/handlers/log.rs
56–60 ↗(On Diff #35667)

Clippy doesn't like repeating names (Error) and I think I agree

services/blob/src/database/types.rs
189–217 ↗(On Diff #35667)

These were changed using a code action provided by rust-analyzer.

This revision is now accepted and ready to land.Jan 16 2024, 6:37 AM