recently, #495 modularized integration testing, and we have a few files under tests/
some of the tests on those files though, have use statements inside their functions bodies
this use to be necessary because we used to have all the tests for all feature flags in the same file, but that's no longer the case
so simply move all those imports into a top-level item
example:
use smallvec::SmallVec;
#[test]
fn test_serde() {
use serde_test::{assert_tokens, Token};
let mut small_vec: SmallVec<i32, 2> = SmallVec::new();
// ...
should change to
use smallvec::SmallVec;
use serde_test::{assert_tokens, Token};
#[test]
fn test_serde() {
let mut small_vec: SmallVec<i32, 2> = SmallVec::new();
// ...
recently, #495 modularized integration testing, and we have a few files under
tests/some of the tests on those files though, have
usestatements inside their functions bodiesthis use to be necessary because we used to have all the tests for all feature flags in the same file, but that's no longer the case
so simply move all those imports into a top-level item
example:
should change to