/// Converts a [`Mask`] and a `calling_bell` into a set of [`CourseHeadMask`]s which, between
/// them, match the same rows as the source [`Mask`] but all **explicitly** specify a position
/// for the `calling_bell`.  This way, if two calls have the same position within a course,
/// they must be given the same calling position (this makes graph expansion much simpler).
///
/// An example where this expansion is needed is if the tenor (the `8`) is used as a calling
/// bell for the course mask `12345xxx`.  This generates a situation where the same call is
/// given different names depending on the exact course head used (e.g. a call at `123458xx`
/// would be called a `M`, whereas a call at `12345xx8` would be called `H`).


An example where this expansion is needed is if the tenor (the `8`) is used as a calling
bell for the course mask `12345xxx`.  This generates a situation where the same call is
given different names depending on the exact course head used .
An example where this expansion is needed is if the tenor ( the ` 8 ` ) is used as a calling bell for the course mask ` 12345xxx ` . This generates a situation where the same call is given different names depending on the exact course head used .
pub(super) fn new(mask: Mask, calling_bell: Bell) -> Vec<Self> {
        if mask.place_of(calling_bell).is_some() {
            return vec![Self { mask }];
        } else {
            mask.unspecified_places()
                .map(|pl| {
                    let mut new_mask = mask.to_owned();
                    // Unwrap is safe because the calling bell can't already be in the mask
                    new_mask.set_bell(calling_bell, pl).unwrap();
                    Self { mask: new_mask }
                })
                .collect_vec()
        }
    }
pub ( super ) fn new ( mask : Mask , calling_bell : Bell ) -> Vec < Self > { if mask . place_of ( calling_bell ) . is_some ( ) { return vec ! [ Self { mask } ] ; } else { mask . unspecified_places ( ) . map ( | pl | { let mut new_mask = mask . to_owned ( ) ; // Unwrap is safe because the calling bell can't already be in the mask new_mask . set_bell ( calling_bell , pl ) . unwrap ( ) ; Self { mask : new_mask } } ) . collect_vec ( ) } }
Converts a [`Mask`] and a `calling_bell` into a set of [`CourseHeadMask`]s which, between
them, match the same rows as the source [`Mask`] but all **explicitly** specify a position
for the `calling_bell`.
Converts a [ ` Mask ` ] and a ` calling_bell ` into a set of [ ` CourseHeadMask ` ] s which between them match the same rows as the source [ ` Mask ` ] but all ** explicitly ** specify a position for the ` calling_bell ` .
mask
Mask
calling_bell
Bell