async fn partition_has_label<T>(partition: &T, desired_label: &str) -> bool
where
    T: PartitionProxyInterface,
{
    match partition.get_name().await {
        Err(_) => false,
        Ok((_, None)) => false,
        Ok((status, Some(name))) => {
            if zx::Status::from_raw(status) != zx::Status::OK {
                false
            } else {
                name == desired_label
            }
        }
    }
}
/// Given a partition, return true if the partition has the desired label
Given a partition, return true if the partition has the desired label
Given a partition return true if the partition has the desired label
async fn partition_has_label<T>(partition: &T, desired_label: &str) -> bool
where
    T: PartitionProxyInterface,
{
    match partition.get_name().await {
        Err(_) => false,
        Ok((_, None)) => false,
        Ok((status, Some(name))) => {
            if zx::Status::from_raw(status) != zx::Status::OK {
                false
            } else {
                name == desired_label
            }
        }
    }
}
async fn partition_has_label < T > ( partition : & T , desired_label : & str ) -> bool where T : PartitionProxyInterface , { match partition . get_name ( ) . await { Err ( _ ) => false , Ok ( ( _ , None ) ) => false , Ok ( ( status , Some ( name ) ) ) => { if zx :: Status :: from_raw ( status ) != zx :: Status :: OK { false } else { name == desired_label } } } }
Given a partition, return true if the partition has the desired label
Given a partition return true if the partition has the desired label
partition
&T
desired_label
&str
partition
&T
desired_label
&str