Skip to content

Commit

Permalink
Rename features to snake-case
Browse files Browse the repository at this point in the history
More in line with the package names. User-facing existing ones on 'gdnative' are not affected.
  • Loading branch information
Bromeon committed Dec 20, 2021
1 parent 2fe9046 commit 1e0f689
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/composite/godot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
if grep -q "Leaked instance" "${{ runner.temp }}/stdout.log"; then
exit 1;
fi;
cargo build --features=type_tag_fallback;
cargo build --features type-tag-fallback;
mkdir -p ./project/lib;
cp ../target/debug/libgdnative_test.so ./project/lib/;
${GODOT_BIN} --path ./project/ > >(tee "${{ runner.temp }}/stdout.log");
Expand Down
2 changes: 1 addition & 1 deletion gdnative-bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2018"

[features]
formatted = []
one_class_one_file = []
one-class-one-file = []
custom-godot = ["which"]

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions gdnative-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn main() {
}

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

/// Output one file for each class and add `mod` and `use` declarations in
/// the `generated.rs` file.
#[cfg(feature = "one_class_one_file")]
#[cfg(feature = "one-class-one-file")]
fn generate(
out_path: &std::path::Path,
generated_file: &mut BufWriter<File>,
Expand Down
4 changes: 2 additions & 2 deletions gdnative-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ edition = "2018"

[features]
default = []
gd_test = []
type_tag_fallback = []
gd-test = []
type-tag-fallback = []

[dependencies]
gdnative-sys = { path = "../gdnative-sys", version = "0.9.3" }
Expand Down
2 changes: 1 addition & 1 deletion gdnative-core/src/core_types/geom/transform2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl std::ops::Mul<Transform2D> for Transform2D {
}
}

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

Expand Down
4 changes: 2 additions & 2 deletions gdnative-core/src/export/type_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl Tag {
}

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

Expand Down
4 changes: 2 additions & 2 deletions gdnative-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
clippy::missing_safety_doc,
clippy::non_send_fields_in_send_ty
)]
#![cfg_attr(feature = "gd_test", allow(clippy::blacklisted_name))]
#![cfg_attr(feature = "gd-test", allow(clippy::blacklisted_name))]

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

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

#[cfg(feature = "gd_test")]
#[cfg(feature = "gd-test")]
#[macro_use]
extern crate approx;

Expand Down
2 changes: 1 addition & 1 deletion gdnative-core/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ macro_rules! impl_basic_traits_as_sys {
macro_rules! godot_test {
($($test_name:ident $body:block)*) => {
$(
#[cfg(feature = "gd_test")]
#[cfg(feature = "gd-test")]
#[doc(hidden)]
#[inline]
pub fn $test_name() -> bool {
Expand Down
10 changes: 5 additions & 5 deletions gdnative/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ edition = "2018"

[features]
# Public
default = []
async = ["gdnative-async"]
custom-godot = ["gdnative-bindings/custom-godot"]
default = []
formatted = ["gdnative-bindings/formatted", "gdnative-bindings/one_class_one_file"]
formatted = ["gdnative-bindings/formatted", "gdnative-bindings/one-class-one-file"]
serde = ["gdnative-core/serde"]

# Internal
gd_test = ["gdnative-core/gd_test"]
type_tag_fallback = ["gdnative-core/type_tag_fallback"]
gd-test = ["gdnative-core/gd-test"]
type-tag-fallback = ["gdnative-core/type-tag-fallback"]

[dependencies]
gdnative-derive = { path = "../gdnative-derive", version = "=0.9.3" }
gdnative-core = { path = "../gdnative-core", version = "=0.9.3" }
gdnative-bindings = { path = "../gdnative-bindings", version = "=0.9.3" }
gdnative-async = { optional = true, path = "../gdnative-async", version = "=0.9.3" }
gdnative-async = { path = "../gdnative-async", version = "=0.9.3", optional = true }

[dev-dependencies]
trybuild = "1.0.50"
Expand Down
4 changes: 2 additions & 2 deletions test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ crate-type = ["cdylib"]

[features]
default = []
type_tag_fallback = ["gdnative/type_tag_fallback"]
type-tag-fallback = ["gdnative/type-tag-fallback"]
custom-godot = ["gdnative/custom-godot"]

[dependencies]
gdnative = { path = "../gdnative", features = ["gd_test", "serde", "async"] }
gdnative = { path = "../gdnative", features = ["gd-test", "serde", "async"] }
gdnative-derive = { path = "../gdnative-derive" }
approx = "0.5.0"
ron = "0.7.0"
Expand Down

0 comments on commit 1e0f689

Please sign in to comment.