Skip to content

Commit 496f022

Browse files
committed
fix double build failing
1 parent f73b4e0 commit 496f022

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

itest/rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
*/
66

7-
use godot::engine::{Engine, Node, Window};
7+
use godot::engine::{Engine, Node};
88
use godot::init::{gdextension, ExtensionLibrary};
99
use godot::obj::Gd;
1010
use godot::sys;

itest/rust/src/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::time::{Duration, Instant};
88

99
use godot::bind::{godot_api, GodotClass};
1010
use godot::builtin::{ToVariant, Variant, VariantArray};
11-
use godot::engine::{Node, Window};
11+
use godot::engine::Node;
1212
use godot::obj::Gd;
1313

1414
use crate::{RustTestCase, TestContext};

itest/rust/src/virtual_methods_test.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
use crate::TestContext;
1010
use godot::bind::{godot_api, GodotClass};
1111
use godot::builtin::{
12-
is_equal_approx, varray, Color, GodotString, PackedByteArray, PackedColorArray,
12+
is_equal_approx, real, varray, Color, GodotString, PackedByteArray, PackedColorArray,
1313
PackedFloat32Array, PackedInt32Array, PackedStringArray, PackedVector2Array,
14-
PackedVector3Array, StringName, ToVariant, Variant, VariantArray, Vector2, Vector3,
14+
PackedVector3Array, RealConv, StringName, ToVariant, Variant, VariantArray, Vector2, Vector3,
1515
};
1616
use godot::engine::node::InternalMode;
1717
use godot::engine::resource_loader::CacheMode;
1818
use godot::engine::{
1919
BoxMesh, InputEvent, InputEventAction, Node, Node2D, Node2DVirtual, PrimitiveMesh,
2020
PrimitiveMeshVirtual, RefCounted, RefCountedVirtual, ResourceFormatLoader,
21-
ResourceFormatLoaderVirtual, ResourceLoader, Viewport, Window,
21+
ResourceFormatLoaderVirtual, ResourceLoader, Window,
2222
};
2323
use godot::obj::{Base, Gd, Share};
2424
use godot::private::class_macros::assert_eq_approx;
@@ -330,7 +330,7 @@ fn test_virtual_method_with_return(_test_context: &TestContext) {
330330
assert_eq_approx!(
331331
arr.get(2).to::<PackedFloat32Array>().get(3),
332332
arr_rust.get(2).to::<PackedFloat32Array>().get(3),
333-
is_equal_approx
333+
|a, b| is_equal_approx(real::from_f32(a), real::from_f32(b))
334334
);
335335
assert_eq_approx!(
336336
arr.get(3).to::<PackedColorArray>().get(0),
@@ -386,6 +386,7 @@ fn test_input_event(test_context: &TestContext) {
386386
false,
387387
InternalMode::INTERNAL_MODE_DISABLED,
388388
);
389+
389390
test_viewport.share().add_child(
390391
obj.share().upcast(),
391392
false,

0 commit comments

Comments
 (0)