Skip to content

Commit 1fae3ae

Browse files
committed
Move export::{Instance,RefInstance} -> object
1 parent 03ff45f commit 1fae3ae

File tree

12 files changed

+656
-660
lines changed

12 files changed

+656
-660
lines changed

gdnative-async/src/method.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use std::sync::Arc;
55
use futures_task::{LocalFutureObj, LocalSpawn, SpawnError};
66

77
use gdnative_core::core_types::{ToVariant, Variant};
8-
use gdnative_core::export::{Method, Varargs};
9-
use gdnative_core::export::{NativeClass, RefInstance};
8+
use gdnative_core::export::{Method, NativeClass, Varargs};
109
use gdnative_core::log::{self, Site};
1110
use gdnative_core::object::ownership::Shared;
11+
use gdnative_core::object::RefInstance;
1212

1313
use crate::rt::Context;
1414

gdnative-async/src/rt.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
use std::marker::PhantomData;
22

3+
use func_state::FuncState;
34
use gdnative_bindings::Object;
4-
use gdnative_core::object::SubClass;
5-
65
use gdnative_core::core_types::{GodotError, Variant};
7-
use gdnative_core::export::{Instance, RefInstance};
86
use gdnative_core::init::InitHandle;
97
use gdnative_core::object::ownership::Shared;
10-
use gdnative_core::object::TRef;
8+
use gdnative_core::object::{Instance, RefInstance, SubClass, TRef};
119

1210
use crate::future;
1311

1412
mod bridge;
1513
mod func_state;
1614

17-
use func_state::FuncState;
18-
1915
/// Context for creating `yield`-like futures in async methods.
2016
pub struct Context {
2117
func_state: Instance<FuncState, Shared>,

gdnative-async/src/rt/bridge.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use parking_lot::Mutex;
66
use gdnative_bindings::{Object, Reference};
77
use gdnative_core::core_types::{GodotError, Variant, VariantArray};
88
use gdnative_core::export::user_data::{ArcData, Map};
9-
use gdnative_core::export::{ClassBuilder, Method, Varargs};
10-
use gdnative_core::export::{Instance, NativeClass, NativeClassMethods, RefInstance};
9+
use gdnative_core::export::{ClassBuilder, Method, NativeClass, NativeClassMethods, Varargs};
1110
use gdnative_core::godot_site;
12-
use gdnative_core::object::{ownership::Shared, TRef};
11+
use gdnative_core::object::ownership::Shared;
12+
use gdnative_core::object::{Instance, RefInstance, TRef};
1313

1414
use crate::future::Resume;
1515

gdnative-async/src/rt/func_state.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ use gdnative_bindings::Reference;
22
use gdnative_core::core_types::{ToVariant, Variant, VariantType};
33
use gdnative_core::export::user_data::{LocalCellData, Map, MapMut};
44
use gdnative_core::export::{
5-
ClassBuilder, ExportInfo, PropertyUsage, Signal, SignalArgument, StaticArgs, StaticArgsMethod,
5+
ClassBuilder, ExportInfo, NativeClass, NativeClassMethods, PropertyUsage, Signal,
6+
SignalArgument, StaticArgs, StaticArgsMethod,
67
};
7-
use gdnative_core::export::{Instance, NativeClass, NativeClassMethods, RefInstance};
88
use gdnative_core::godot_site;
99
use gdnative_core::object::ownership::{Shared, Unique};
10+
use gdnative_core::object::{Instance, RefInstance};
1011
use gdnative_derive::FromVarargs;
1112

1213
use crate::future::Resume;

gdnative-bindings/src/utils.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
//! Utility functions and extension traits that depend on generated bindings
22
3-
use super::generated::{Engine, Node, SceneTree};
4-
use gdnative_core::export::{NativeClass, RefInstance};
3+
use gdnative_core::export::NativeClass;
54
use gdnative_core::object::ownership::Shared;
6-
use gdnative_core::object::{SubClass, TRef};
5+
use gdnative_core::object::{RefInstance, SubClass, TRef};
6+
7+
use super::generated::{Engine, Node, SceneTree};
78

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

0 commit comments

Comments
 (0)