Skip to content

Commit c9a5b84

Browse files
committed
Move export::{Instance,RefInstance} -> object
1 parent cb516f2 commit c9a5b84

File tree

12 files changed

+656
-654
lines changed

12 files changed

+656
-654
lines changed

gdnative-async/src/method.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ 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::NativeClass;
89
use gdnative_core::export::{Method, Varargs};
9-
use gdnative_core::export::{NativeClass, RefInstance};
1010
use gdnative_core::log::{self, Site};
1111
use gdnative_core::object::ownership::Shared;
12+
use gdnative_core::object::RefInstance;
1213

1314
use crate::rt::Context;
1415

gdnative-async/src/rt.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
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;
8+
use gdnative_core::object::SubClass;
109
use gdnative_core::object::TRef;
10+
use gdnative_core::object::{Instance, RefInstance};
1111

1212
use crate::future;
1313

1414
mod bridge;
1515
mod func_state;
1616

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

gdnative-async/src/rt/bridge.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use gdnative_bindings::{Object, Reference};
77
use gdnative_core::core_types::{GodotError, Variant, VariantArray};
88
use gdnative_core::export::user_data::{ArcData, Map};
99
use gdnative_core::export::{ClassBuilder, Method, Varargs};
10-
use gdnative_core::export::{Instance, NativeClass, NativeClassMethods, RefInstance};
10+
use gdnative_core::export::{NativeClass, NativeClassMethods};
1111
use gdnative_core::godot_site;
1212
use gdnative_core::object::{ownership::Shared, TRef};
13+
use gdnative_core::object::{Instance, RefInstance};
1314

1415
use crate::future::Resume;
1516

gdnative-async/src/rt/func_state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ use gdnative_core::export::user_data::{LocalCellData, Map, MapMut};
44
use gdnative_core::export::{
55
ClassBuilder, ExportInfo, PropertyUsage, Signal, SignalArgument, StaticArgs, StaticArgsMethod,
66
};
7-
use gdnative_core::export::{Instance, NativeClass, NativeClassMethods, RefInstance};
7+
use gdnative_core::export::{NativeClass, NativeClassMethods};
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
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;
5+
use gdnative_core::object::RefInstance;
66
use gdnative_core::object::{SubClass, TRef};
77

8+
use super::generated::{Engine, Node, SceneTree};
9+
810
/// Convenience method to obtain a reference to an "auto-load" node, that is a child of the root
911
/// node. Returns `None` if the node does not exist or is not of the correct type.
1012
///

0 commit comments

Comments
 (0)