Function
insert_option
(options: &mut Vec<OptionState>, option_state: OptionState)
Source from the content-addressed store, hash-verified
| 116 | } |
| 117 | |
| 118 | fn insert_option(options: &mut Vec<OptionState>, option_state: OptionState) { |
| 119 | let insert_at = options.partition_point(|option| option.index <= option_state.index); |
| 120 | options.insert(insert_at, option_state); |
| 121 | } |
| 122 | |
| 123 | /// Remove a registered option by id. |
| 124 | pub(crate) fn remove_option(mut options: Signal<Vec<OptionState>>, id: &str) { |
Tested by
no test coverage detected