Skip to content

Commit

Permalink
Fix tests for renamed "gen" feature
Browse files Browse the repository at this point in the history
I guess the earlier commit to rename this missed these, and Rustc didn't
have a warning for non-existent features at the time. Seems to build
with or without the feature now.
  • Loading branch information
ids1024 authored and Drakulix committed Sep 27, 2024
1 parent c0470c7 commit e9e3764
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions gbm-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
extern crate bindgen;

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
fn main() {}

#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
fn main() {
use std::{env, path::Path};

Expand Down
4 changes: 2 additions & 2 deletions gbm-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// it is not so.
#![cfg_attr(test, allow(deref_nullptr))]

#[cfg(feature = "gen")]
#[cfg(feature = "use_bindgen")]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

#[cfg(not(feature = "gen"))]
#[cfg(not(feature = "use_bindgen"))]
include!("bindings.rs");

#[link(name = "gbm")]
Expand Down

0 comments on commit e9e3764

Please sign in to comment.