Skip to content

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Sep 8, 2024

Use clone when appropriate.

let include_paths: Vec<String> = if cfg!(feature = "bundled") {
vec![sdl2_includes]
} else {
compute_include_paths(sdl2_includes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails to compile with bindgen and bundled features enabled, so please put the call to compute_include_paths back behind #[cfg(not(feature = "bundled"))].

I get that the formatting could be better, how about this instead?

#[cfg(feature = "bundled")]
let include_paths = vec![sdl2_includes];

#[cfg(not(feature = "bundled"))]
let include_paths = compute_include_paths(sdl2_includes);

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.

2 participants