Skip to content

Commit 0792bfb

Browse files
authored
Merge pull request #11 from molpopgen/clippy_skip_bindgen
clippy now skips bindgen output
2 parents 530593a + 089909f commit 0792bfb

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/bindings.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
//! Those docs describe the most important parts of the C API.
2525
//! This module contains the same types/functions with the same names.
2626
27-
include!(concat!(env!("OUT_DIR"), "/auto_bindings.rs"));
27+
#![allow(clippy::all)]
2828

29-
// tskit defines this via a type cast
30-
// in a macro. bindgen thus misses it.
31-
// See bindgen issue 316.
32-
/// "Null" identifier value.
33-
pub const TSK_NULL: tsk_id_t = -1;
29+
include!(concat!(env!("OUT_DIR"), "/auto_bindings.rs"));

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ pub mod types;
2020
// we can't live without
2121
pub use bindings::TSK_NODE_IS_SAMPLE;
2222
pub use bindings::TSK_NO_BUILD_INDEXES;
23-
pub use bindings::TSK_NULL;
2423
pub use bindings::TSK_SAMPLE_LISTS;
2524

2625
// re-export types, too
2726
pub use bindings::tsk_flags_t;
2827
pub use bindings::tsk_id_t;
2928
pub use bindings::tsk_size_t;
3029

30+
// tskit defines this via a type cast
31+
// in a macro. bindgen thus misses it.
32+
// See bindgen issue 316.
33+
/// "Null" identifier value.
34+
pub const TSK_NULL: tsk_id_t = -1;
35+
3136
pub use edge_table::EdgeTable;
3237
pub use error::TskitRustError;
3338
pub use mutation_table::MutationTable;

src/test_tsk_variables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ mod tests {
1313

1414
#[test]
1515
fn test_tsk_null() {
16-
assert_eq!(bindings::TSK_NULL, -1);
16+
assert_eq!(TSK_NULL, -1);
1717
}
1818
}

0 commit comments

Comments
 (0)