Skip to content

Commit 510eef2

Browse files
committed
Update several moved paths
1 parent ce9abec commit 510eef2

File tree

28 files changed

+75
-78
lines changed

28 files changed

+75
-78
lines changed

godot-codegen/src/conv/type_conversions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn to_rust_type_uncached(full_ty: &GodotTy, ctx: &mut Context) -> RustTy {
172172
let bitfield_ty = conv::make_enum_name(bitfield);
173173

174174
RustTy::EngineBitfield {
175-
tokens: quote! { crate::engine::global::#bitfield_ty },
175+
tokens: quote! { crate::global::#bitfield_ty },
176176
surrounding_class: None,
177177
}
178178
};
@@ -193,7 +193,7 @@ fn to_rust_type_uncached(full_ty: &GodotTy, ctx: &mut Context) -> RustTy {
193193
let enum_ty = conv::make_enum_name(qualified_enum);
194194

195195
RustTy::EngineEnum {
196-
tokens: quote! { crate::engine::global::#enum_ty },
196+
tokens: quote! { crate::global::#enum_ty },
197197
surrounding_class: None,
198198
}
199199
};

godot-core/src/builtin/array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ impl<T: ArrayElement> Var for Array<T> {
870870
}
871871

872872
PropertyHintInfo {
873-
hint: crate::engine::global::PropertyHint::ARRAY_TYPE,
873+
hint: crate::global::PropertyHint::ARRAY_TYPE,
874874
hint_string: T::godot_type_name().into(),
875875
}
876876
}
@@ -879,7 +879,7 @@ impl<T: ArrayElement> Var for Array<T> {
879879
impl<T: ArrayElement + TypeStringHint> Export for Array<T> {
880880
fn default_export_info() -> PropertyHintInfo {
881881
PropertyHintInfo {
882-
hint: crate::engine::global::PropertyHint::TYPE_STRING,
882+
hint: crate::global::PropertyHint::TYPE_STRING,
883883
hint_string: T::type_string().into(),
884884
}
885885
}

godot-core/src/builtin/basis.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ use sys::{ffi_methods, GodotFfi};
1010

1111
use crate::builtin::math::{ApproxEq, FloatExt, GlamConv, GlamType};
1212
use crate::builtin::real_consts::FRAC_PI_2;
13-
use crate::builtin::{real, Quaternion, RMat3, RQuat, RVec2, RVec3, Vector3};
14-
15-
use crate::engine::global::EulerOrder;
13+
use crate::builtin::{real, EulerOrder, Quaternion, RMat3, RQuat, RVec2, RVec3, Vector3};
1614
use std::cmp::Ordering;
1715
use std::fmt::Display;
1816
use std::ops::{Mul, MulAssign};

godot-core/src/builtin/meta/registration/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use sys::interface_fn;
1010

1111
use crate::builtin::meta::{ClassName, PropertyInfo, VarcallSignatureTuple};
1212
use crate::builtin::{StringName, Variant};
13-
use crate::engine::global::MethodFlags;
13+
use crate::global::MethodFlags;
1414

1515
/// Info relating to an argument or return type in a method.
1616
pub struct MethodParamOrReturnInfo {

godot-core/src/builtin/packed_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ macro_rules! impl_packed_array {
514514
// In 4.3 Godot can (and does) use type hint strings for packed arrays, see https://github.com/godotengine/godot/pull/82952.
515515
if sys::GdextBuild::since_api("4.3") {
516516
$crate::property::PropertyHintInfo {
517-
hint: $crate::engine::global::PropertyHint::TYPE_STRING,
517+
hint: $crate::global::PropertyHint::TYPE_STRING,
518518
hint_string: <$Element as $crate::property::TypeStringHint>::type_string().into(),
519519
}
520520
} else {

godot-core/src/builtin/quaternion.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ use godot_ffi as sys;
99
use sys::{ffi_methods, GodotFfi};
1010

1111
use crate::builtin::math::{ApproxEq, FloatExt, GlamConv, GlamType};
12-
use crate::builtin::{inner, real, Basis, RQuat, RealConv, Vector3};
13-
14-
use crate::engine::global::EulerOrder;
12+
use crate::builtin::{inner, real, Basis, EulerOrder, RQuat, RealConv, Vector3};
1513
use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign};
1614

1715
use super::meta::impl_godot_as_self;

godot-core/src/builtin/rect2.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ use godot_ffi as sys;
99
use sys::{ffi_methods, GodotFfi};
1010

1111
use crate::builtin::math::ApproxEq;
12-
use crate::builtin::{real, Rect2i, Vector2};
13-
use crate::engine::global::Side;
12+
use crate::builtin::{real, Rect2i, Side, Vector2};
1413

1514
use super::meta::impl_godot_as_self;
1615

godot-core/src/builtin/rect2i.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77

88
use std::cmp;
99

10-
use crate::engine::global::Side;
10+
use crate::builtin::meta::impl_godot_as_self;
11+
use crate::builtin::{Rect2, Side, Vector2i};
1112
use godot_ffi as sys;
1213
use sys::{ffi_methods, GodotFfi};
1314

14-
use super::{meta::impl_godot_as_self, Rect2, Vector2i};
15-
1615
/// 2D axis-aligned integer bounding box.
1716
///
1817
/// `Rect2i` consists of a position, a size, and several utility functions. It is typically used for

godot-core/src/builtin/signal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use std::ptr;
1010

1111
use godot_ffi as sys;
1212

13-
use super::meta::{impl_godot_as_self, FromGodot, GodotType};
14-
use crate::builtin::meta::ToGodot;
13+
use crate::builtin::meta::{impl_godot_as_self, FromGodot, GodotType, ToGodot};
1514
use crate::builtin::{inner, Array, Callable, Dictionary, StringName, Variant};
16-
use crate::engine::{global::Error, Object};
15+
use crate::engine::Object;
16+
use crate::global::Error;
1717
use crate::obj::bounds::DynMemory;
1818
use crate::obj::{Bounds, Gd, GodotClass, InstanceId};
1919
use sys::{ffi_methods, GodotFfi};

godot-core/src/engine/mod.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,34 @@ pub mod native {
3939
// ----------------------------------------------------------------------------------------------------------------------------------------------
4040
// Deprecations
4141

42-
// #[deprecated = "Enums have been moved to `godot::global`."]
43-
// pub mod global {
44-
// pub use crate::builtin::{Corner, EulerOrder, Side};
45-
// pub use crate::global::*;
46-
// }
47-
//
48-
// #[deprecated = "Utility functions have been moved to `godot::global`."]
49-
// pub mod utilities {
50-
// pub use crate::global::*;
51-
// }
52-
//
53-
// #[deprecated = "`GFile` has been moved to `godot::extras`."]
54-
// pub use crate::extras::GFile;
55-
//
56-
// #[deprecated = "`IoError` has been moved to `godot::extras`."]
57-
// pub use crate::extras::IoError;
58-
//
59-
// #[deprecated = "`save` has been moved to `godot::global`."]
60-
// pub use crate::global::save;
61-
//
62-
// #[deprecated = "`try_save` has been moved to `godot::global`."]
63-
// pub use crate::global::try_save;
64-
//
65-
// #[deprecated = "`load` has been moved to `godot::global`."]
66-
// pub use crate::global::load;
67-
//
68-
// #[deprecated = "`try_load` has been moved to `godot::global`."]
69-
// pub use crate::global::try_load;
42+
#[deprecated = "Enums have been moved to `godot::global`."]
43+
pub mod global {
44+
pub use crate::builtin::{Corner, EulerOrder, Side};
45+
pub use crate::global::*;
46+
}
47+
48+
#[deprecated = "Utility functions have been moved to `godot::global`."]
49+
pub mod utilities {
50+
pub use crate::global::*;
51+
}
52+
53+
#[deprecated = "`GFile` has been moved to `godot::extras`."]
54+
pub use crate::extras::GFile;
55+
56+
#[deprecated = "`IoError` has been moved to `godot::extras`."]
57+
pub use crate::extras::IoError;
58+
59+
#[deprecated = "`save` has been moved to `godot::global`."]
60+
pub use crate::global::save;
61+
62+
#[deprecated = "`try_save` has been moved to `godot::global`."]
63+
pub use crate::global::try_save;
64+
65+
#[deprecated = "`load` has been moved to `godot::global`."]
66+
pub use crate::global::load;
67+
68+
#[deprecated = "`try_load` has been moved to `godot::global`."]
69+
pub use crate::global::try_load;
7070

7171
// ----------------------------------------------------------------------------------------------------------------------------------------------
7272
// Utilities for crate

0 commit comments

Comments
 (0)