firecracker-microvm/firecracker

Use `clippy::as_conversions`

オープン

#3,161 opened on 2022/10/04

 (10 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (2,393 件のフォーク)batch import
Good first issuePriority: LowStatus: ParkedType: Fix

Repository metrics

Stars
 (34,348 個のスター)
PR merge metrics
 (PR metrics pending)

説明

From a discussion https://github.com/firecracker-microvm/firecracker/pull/3156#discussion_r986640407 it was thought utilizing the clippy lint clippy::as_conversions would introduce additional safety.

It would be good to implement this lint, either via #![warn(clippy::as_conversions)] or passed as a command line argument under test_clippy.py.

To break up this work, we can implement the following lints incrementally:

  • #3195
  • #3196
  • #3197
  • #3198
  • #3199
  • #3200
  • #3201
  • #3202
  • #3203
  • In Cargo.toml replace
    ptr_as_ptr = "warn"
    cast_lossless = "warn"
    cast_possible_truncation = "warn"
    cast_possible_wrap = "warn"
    cast_sign_loss = "warn"
    
    with
    as_conversions = "warn"
    
    and fix warnings.

コントリビューターガイド