Lines
100 %
Functions
Branches
//! The commodity an account pick fills into a split.
use super::FormOption;
/// The commodity to fill after `account` is picked: its only commodity.
pub fn commodity_fill(options: &[FormOption], account: &str) -> Option<String> {
options
.iter()
.find(|option| option.id == account)?
.commodity
.clone()
}