fn check_required_extensions(
    instance: &Instance,
    physical_device: &vk::PhysicalDevice,
) -> bool {
    let extensions = unsafe {
        instance
            .ash
            .enumerate_device_extension_properties(*physical_device)
            .unwrap_or_else(|_| vec![])
    };
    extensions
        .iter()
        .map(|extension| {
            String::from_utf8(
                extension.extension_name.iter().map(|c| *c as u8).collect(),
            )
            .unwrap()
        })
        .filter(|name| required_extensions().contains(name))
        .collect::<Vec<String>>()
        .is_empty()
}
/// Fetch a vector of all missing device extensions based on the required
/// extensions.
Fetch a vector of all missing device extensions based on the required
extensions.
Fetch a vector of all missing device extensions based on the required extensions .
fn check_required_extensions(
    instance: &Instance,
    physical_device: &vk::PhysicalDevice,
) -> bool {
    let extensions = unsafe {
        instance
            .ash
            .enumerate_device_extension_properties(*physical_device)
            .unwrap_or_else(|_| vec![])
    };
    extensions
        .iter()
        .map(|extension| {
            String::from_utf8(
                extension.extension_name.iter().map(|c| *c as u8).collect(),
            )
            .unwrap()
        })
        .filter(|name| required_extensions().contains(name))
        .collect::<Vec<String>>()
        .is_empty()
}
fn check_required_extensions ( instance : & Instance , physical_device : & vk :: PhysicalDevice , ) -> bool { let extensions = unsafe { instance . ash . enumerate_device_extension_properties ( * physical_device ) . unwrap_or_else ( | _ | vec ! [ ] ) } ; extensions . iter ( ) . map ( | extension | { String :: from_utf8 ( extension . extension_name . iter ( ) . map ( | c | * c as u8 ) . collect ( ) , ) . unwrap ( ) } ) . filter ( | name | required_extensions ( ) . contains ( name ) ) . collect :: < Vec < String > > ( ) . is_empty ( ) }
Fetch a vector of all missing device extensions based on the required
extensions.
Fetch a vector of all missing device extensions based on the required extensions .
instance
&Instance
physical_device
&vk::PhysicalDevice