Skip to content

Commit 5a947cf

Browse files
committed
Move GodotObject, Null, NewRef, Ref, TRef to 'object' module; remove from top-level
1 parent 13bab10 commit 5a947cf

File tree

20 files changed

+25
-30
lines changed

20 files changed

+25
-30
lines changed

gdnative-bindings/src/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use std::sync::Once;
99
use gdnative_core::core_types::*;
1010
use gdnative_core::object::*;
1111
use gdnative_core::private::get_api;
12+
use gdnative_core::ref_kind;
1213
use gdnative_core::sys;
1314
use gdnative_core::sys::GodotApi;
1415
use gdnative_core::thread_access;
15-
use gdnative_core::{ref_kind, GodotResult};
1616

1717
include!(concat!(env!("OUT_DIR"), "/generated.rs"));

gdnative-bindings/src/utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
33
use super::generated::{Engine, Node, SceneTree};
44
use gdnative_core::nativescript::{NativeClass, RefInstance};
5-
use gdnative_core::object::SubClass;
5+
use gdnative_core::object::{SubClass, TRef};
66
use gdnative_core::thread_access::Shared;
7-
use gdnative_core::TRef;
87

98
/// Convenience method to obtain a reference to an "auto-load" node, that is a child of the root
109
/// node. Returns `None` if the node does not exist or is not of the correct type.

gdnative-core/src/core_types/byte_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub type ByteArray = TypedArray<u8>;
55

66
godot_test!(
77
test_byte_array_access {
8-
use crate::NewRef as _;
8+
use crate::object::NewRef as _;
99

1010
let arr = (0..8).collect::<ByteArray>();
1111

gdnative-core/src/core_types/color_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub type ColorArray = TypedArray<Color>;
66

77
godot_test!(
88
test_color_array_access {
9-
use crate::NewRef as _;
9+
use crate::object::NewRef as _;
1010

1111
let arr = ColorArray::from_vec(vec![
1212
Color::from_rgb(1.0, 0.0, 0.0),

gdnative-core/src/core_types/dictionary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::core_types::ToVariant;
1212
use crate::core_types::ToVariantEq;
1313
use crate::core_types::Variant;
1414
use crate::core_types::VariantArray;
15-
use crate::NewRef;
15+
use crate::object::NewRef;
1616
use std::fmt;
1717

1818
use crate::thread_access::*;

gdnative-core/src/core_types/float32_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub type Float32Array = TypedArray<f32>;
55

66
godot_test!(
77
test_float32_array_access {
8-
use crate::NewRef as _;
8+
use crate::object::NewRef as _;
99

1010
let arr = (0..8).map(|i| i as f32).collect::<Float32Array>();
1111

gdnative-core/src/core_types/int32_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub type Int32Array = TypedArray<i32>;
55

66
godot_test!(
77
test_int32_array_access {
8-
use crate::NewRef as _;
8+
use crate::object::NewRef as _;
99

1010
let arr = (0..8).collect::<Int32Array>();
1111

gdnative-core/src/core_types/node_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::core_types::GodotString;
2+
use crate::object::NewRef;
23
use crate::private::get_api;
34
use crate::sys;
4-
use crate::NewRef;
55
use std::fmt;
66

77
/// A reference-counted relative or absolute path in a scene tree, for use with `Node.get_node()` and similar

gdnative-core/src/core_types/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use crate::object::NewRef;
12
use crate::private::get_api;
23
use crate::sys;
3-
use crate::NewRef;
44

55
use std::cmp::Ordering;
66
use std::convert::TryFrom;

gdnative-core/src/core_types/string_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub type StringArray = TypedArray<GodotString>;
66

77
godot_test!(
88
test_string_array_access {
9-
use crate::NewRef as _;
9+
use crate::object::NewRef as _;
1010

1111
let arr = StringArray::from_vec(vec![
1212
GodotString::from("foo"),

0 commit comments

Comments
 (0)