Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Use parameter_types instead of thread_local for test-setup  #12020

@kianenigma

Description

@kianenigma
parameter_types! {
    pub static Members: BoundedVec<u64,ConstU32<10_u32>> = bounded_vec![0,10]
}

and then you get Members::get() and Members::set() with the same functionality.

Originally posted by @kianenigma in #11996 (comment)


As per explained in the above PR.

Metadata

Metadata

Assignees

Labels

I5-testsTests need fixing, improving or augmenting.I7-refactorCode needs refactoring.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderZ6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions