rust-lang/rust-clippy

Extensions to should_assert_eq

Open

#1810 aperta il 3 giu 2017

Vedi su GitHub
 (1 commento) (1 reazione) (1 assegnatario)Rust (1391 fork)batch import
C-enhancementgood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 19g 22h) (113 PR mergiate in 30 g)

Descrizione

I found this in the standard library:

assert!(o == owned && b == borrowed)

This should be a case for should_assert_eq. Additionally, it might be nice to have a lint that suggests splitting asserts with && to multiple assert statements, for better debugging.

Guida contributor