pub fn find_target_label(
        list: &[NexusChildLabel<'_>],
    ) -> Option<NexusLabel> {
        for status in &[
            NexusLabelStatus::Both,
            NexusLabelStatus::Primary,
            NexusLabelStatus::Secondary,
        ] {
            for label in list {
                if let Some(target) = &label.label {
                    if target.status == *status {
                        return Some(target.clone());
                    }
                }
            }
        }
        None
    }
/// Search for the first "valid" NexusLabel.
/// Prefer a target label where the primary and secondary GPT headers
/// are both valid (on disk), but a target with at least one valid
/// GPT header (on disk) is considered acceptable.
Search for the first "valid" NexusLabel.
Prefer a target label where the primary and secondary GPT headers
are both valid (on disk), but a target with at least one valid
GPT header (on disk) is considered acceptable.
Search for the first " valid " NexusLabel . Prefer a target label where the primary and secondary GPT headers are both valid ( on disk ) but a target with at least one valid GPT header ( on disk ) is considered acceptable .
pub fn find_target_label(
        list: &[NexusChildLabel<'_>],
    ) -> Option<NexusLabel> {
        for status in &[
            NexusLabelStatus::Both,
            NexusLabelStatus::Primary,
            NexusLabelStatus::Secondary,
        ] {
            for label in list {
                if let Some(target) = &label.label {
                    if target.status == *status {
                        return Some(target.clone());
                    }
                }
            }
        }
        None
    }
pub fn find_target_label ( list : & [ NexusChildLabel < ' _ > ] , ) -> Option < NexusLabel > { for status in & [ NexusLabelStatus :: Both , NexusLabelStatus :: Primary , NexusLabelStatus :: Secondary , ] { for label in list { if let Some ( target ) = & label . label { if target . status == * status { return Some ( target . clone ( ) ) ; } } } } None }
Search for the first "valid" NexusLabel.
Search for the first " valid " NexusLabel .
list
&[NexusChildLabel<'_>]