Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unsized p_next arguments for all push_next functions #855

Merged
merged 3 commits into from
Mar 24, 2024

Conversation

lilly-lizard
Copy link
Contributor

Allow unsized pnext arguments for all push_next functions.

This allows users to write functions that receive multiple p_next structs of different types e.g.

fn create_device(p_next_structs: Vec<Box<dyn ExtendsDeviceCreateInfo>>) {
    let mut device_create_info = vk::DeviceCreateInfo::builder();
    for p_next_struct in &mut p_next_structs {
        device_create_info = device_create_info.push_next(p_next_struct.as_mut());
    }
}

@MarijnS95 MarijnS95 changed the title Allow unsized pnext arguments for all push_next functions Allow unsized p_next arguments for all push_next functions Mar 24, 2024
commit 9c80c78
Author: lilly-lizard <bigbanana29@aol.com>
Date:   Sat Jan 6 21:59:56 2024 +1300

    match generator code to master branch (except for one push_next edit)

commit 609ac20
Author: lilly-lizard <bigbanana29@aol.com>
Date:   Sat Jan 6 15:08:26 2024 +1300

    allow unsized pnext arguments for all `push_next` functions
@MarijnS95 MarijnS95 force-pushed the allow-unsized-pnext-args branch from 8a0235d to fd61f55 Compare March 24, 2024 16:37
@MarijnS95 MarijnS95 merged commit e722239 into ash-rs:master Mar 24, 2024
10 checks passed
@MarijnS95 MarijnS95 added this to the Ash 0.38 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants