1
Fork 0

Remove a fishy Clone impl

This commit is contained in:
Oli Scherer 2023-03-14 11:30:23 +00:00
parent 35d06f9c74
commit aad33198ff
4 changed files with 27 additions and 11 deletions

View file

@ -263,7 +263,8 @@ impl AllocDecodingState {
}
pub fn new(data_offsets: Vec<u32>) -> Self {
let decoding_state = vec![Lock::new(State::Empty); data_offsets.len()];
let decoding_state =
std::iter::repeat_with(|| Lock::new(State::Empty)).take(data_offsets.len()).collect();
Self { decoding_state, data_offsets }
}