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)
Sep 5 2024, 3:06 PM
Unknown Object (File)
Sep 5 2024, 3:06 PM
Unknown Object (File)
Sep 5 2024, 3:05 PM
Unknown Object (File)
Sep 5 2024, 3:05 PM
Unknown Object (File)
Aug 6 2024, 10:37 PM
Unknown Object (File)
Aug 6 2024, 10:25 PM
Unknown Object (File)
Aug 6 2024, 10:03 PM
Unknown Object (File)
Aug 6 2024, 10:03 PM
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