Skip to content

Commit 2949a61

Browse files
committed
Rename features to kebab-case
More in line with the package names. User-facing existing ones on 'gdnative' are not affected.
1 parent 194d437 commit 2949a61

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

.github/composite/godot/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ runs:
6868
if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
6969
exit 1;
7070
fi;
71-
cargo build --features=type_tag_fallback;
71+
cargo build --features type-tag-fallback;
7272
mkdir -p ./project/lib;
7373
cp ../target/debug/libgdnative_test.so ./project/lib/;
7474
${GODOT_BIN} --path ./project/ > >(tee "${{ runner.temp }}/stdout.log");

gdnative-bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ edition = "2018"
1212

1313
[features]
1414
formatted = []
15-
one_class_one_file = []
15+
one-class-one-file = []
1616
custom-godot = ["which"]
1717

1818
[dependencies]

gdnative-bindings/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn main() {
5050
}
5151

5252
/// Output all the class bindings into the `generated.rs` file.
53-
#[cfg(not(feature = "one_class_one_file"))]
53+
#[cfg(not(feature = "one-class-one-file"))]
5454
fn generate(
5555
_out_path: &std::path::Path,
5656
generated_file: &mut BufWriter<File>,
@@ -84,7 +84,7 @@ fn generate(
8484

8585
/// Output one file for each class and add `mod` and `use` declarations in
8686
/// the `generated.rs` file.
87-
#[cfg(feature = "one_class_one_file")]
87+
#[cfg(feature = "one-class-one-file")]
8888
fn generate(
8989
out_path: &std::path::Path,
9090
generated_file: &mut BufWriter<File>,

gdnative-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ edition = "2018"
1212

1313
[features]
1414
default = []
15-
gd_test = []
16-
type_tag_fallback = []
15+
gd-test = []
16+
type-tag-fallback = []
1717

1818
[dependencies]
1919
gdnative-sys = { path = "../gdnative-sys", version = "0.9.3" }

gdnative-core/src/core_types/geom/transform2d.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl std::ops::Mul<Transform2D> for Transform2D {
320320
}
321321
}
322322

323-
#[cfg(feature = "gd_test")]
323+
#[cfg(feature = "gd-test")]
324324
fn test_transform2d_behavior_impl() {
325325
let api = crate::private::get_api();
326326

gdnative-core/src/export/type_tag.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ impl Tag {
2323
}
2424

2525
/// Whether the type tag can be transmuted to `usize`. `true` if the layouts are compatible
26-
/// on the platform, and `type_tag_fallback` is not enabled.
27-
const USE_TRANSMUTE: bool = cfg!(not(feature = "type_tag_fallback"))
26+
/// on the platform, and `type-tag-fallback` is not enabled.
27+
const USE_TRANSMUTE: bool = cfg!(not(feature = "type-tag-fallback"))
2828
&& size_of::<Tag>() == size_of::<usize>()
2929
&& align_of::<Tag>() == align_of::<usize>();
3030

gdnative-core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
clippy::missing_safety_doc,
2626
clippy::non_send_fields_in_send_ty
2727
)]
28-
#![cfg_attr(feature = "gd_test", allow(clippy::blacklisted_name))]
28+
#![cfg_attr(feature = "gd-test", allow(clippy::blacklisted_name))]
2929

3030
#[doc(hidden)]
3131
pub extern crate gdnative_sys as sys;
3232

3333
#[doc(hidden)]
3434
pub extern crate libc;
3535

36-
#[cfg(feature = "gd_test")]
36+
#[cfg(feature = "gd-test")]
3737
#[macro_use]
3838
extern crate approx;
3939

gdnative-core/src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ macro_rules! impl_basic_traits_as_sys {
211211
macro_rules! godot_test {
212212
($($test_name:ident $body:block)*) => {
213213
$(
214-
#[cfg(feature = "gd_test")]
214+
#[cfg(feature = "gd-test")]
215215
#[doc(hidden)]
216216
#[inline]
217217
pub fn $test_name() -> bool {

gdnative/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ edition = "2018"
1313

1414
[features]
1515
# Public
16+
default = []
1617
async = ["gdnative-async"]
1718
custom-godot = ["gdnative-bindings/custom-godot"]
18-
default = []
19-
formatted = ["gdnative-bindings/formatted", "gdnative-bindings/one_class_one_file"]
19+
formatted = ["gdnative-bindings/formatted", "gdnative-bindings/one-class-one-file"]
2020
serde = ["gdnative-core/serde"]
2121

2222
# Internal
23-
gd_test = ["gdnative-core/gd_test"]
24-
type_tag_fallback = ["gdnative-core/type_tag_fallback"]
23+
gd-test = ["gdnative-core/gd-test"]
24+
type-tag-fallback = ["gdnative-core/type-tag-fallback"]
2525

2626
[dependencies]
2727
gdnative-derive = { path = "../gdnative-derive", version = "=0.9.3" }
2828
gdnative-core = { path = "../gdnative-core", version = "=0.9.3" }
2929
gdnative-bindings = { path = "../gdnative-bindings", version = "=0.9.3" }
30-
gdnative-async = { optional = true, path = "../gdnative-async", version = "=0.9.3" }
30+
gdnative-async = { path = "../gdnative-async", version = "=0.9.3", optional = true }
3131

3232
[dev-dependencies]
3333
trybuild = "1.0.50"

test/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ crate-type = ["cdylib"]
1010

1111
[features]
1212
default = []
13-
type_tag_fallback = ["gdnative/type_tag_fallback"]
13+
type-tag-fallback = ["gdnative/type-tag-fallback"]
1414
custom-godot = ["gdnative/custom-godot"]
1515

1616
[dependencies]
17-
gdnative = { path = "../gdnative", features = ["gd_test", "serde", "async"] }
17+
gdnative = { path = "../gdnative", features = ["gd-test", "serde", "async"] }
1818
gdnative-derive = { path = "../gdnative-derive" }
1919
approx = "0.5.0"
2020
ron = "0.7.0"

0 commit comments

Comments
 (0)