Skip to content

Commit 257552b

Browse files
authored
Merge pull request #176 from NilsIrl/master
Remove warnings about redundant imports
2 parents f3f9a01 + b5e8017 commit 257552b

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

gdnative-core/src/init.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,8 @@ impl InitHandle {
6565
this: *mut sys::godot_object,
6666
_method_data: *mut libc::c_void,
6767
) -> *mut libc::c_void {
68-
use std::boxed::Box;
6968
use std::cell::RefCell;
7069

71-
use crate::GodotObject;
72-
7370
let val = C::init(C::Base::from_sys(this));
7471

7572
let wrapper = Box::new(RefCell::new(val));
@@ -89,7 +86,6 @@ impl InitHandle {
8986
_method_data: *mut libc::c_void,
9087
user_data: *mut libc::c_void,
9188
) -> () {
92-
use std::boxed::Box;
9389
use std::cell::RefCell;
9490

9591
let wrapper: Box<RefCell<C>> = Box::from_raw(user_data as *mut _);
@@ -141,11 +137,8 @@ impl InitHandle {
141137
this: *mut sys::godot_object,
142138
_method_data: *mut libc::c_void,
143139
) -> *mut libc::c_void {
144-
use std::boxed::Box;
145140
use std::cell::RefCell;
146141

147-
use crate::GodotObject;
148-
149142
let val = C::init(C::Base::from_sys(this));
150143

151144
let wrapper = Box::new(RefCell::new(val));
@@ -165,7 +158,6 @@ impl InitHandle {
165158
_method_data: *mut libc::c_void,
166159
user_data: *mut libc::c_void,
167160
) -> () {
168-
use std::boxed::Box;
169161
use std::cell::RefCell;
170162

171163
let wrapper: Box<RefCell<C>> = Box::from_raw(user_data as *mut _);
@@ -345,7 +337,6 @@ impl<C: NativeClass> ClassBuilder<C> {
345337
}
346338

347339
pub fn add_signal(&self, signal: Signal) {
348-
use std::ptr;
349340
unsafe {
350341
let name = GodotString::from_str(signal.name);
351342
let mut args = signal

gdnative-core/src/object.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub unsafe trait GodotObject {
1515
// This function assumes the godot_object is reference counted.
1616
pub unsafe fn add_ref(obj: *mut sys::godot_object) {
1717
use crate::ReferenceMethodTable;
18-
use std::ptr;
1918
let api = crate::get_api();
2019
let addref_method = ReferenceMethodTable::unchecked_get().reference;
2120
let mut argument_buffer = [ptr::null() as *const libc::c_void; 0];
@@ -37,7 +36,6 @@ pub unsafe fn add_ref(obj: *mut sys::godot_object) {
3736
// This function assumes the godot_object is reference counted.
3837
pub unsafe fn unref(obj: *mut sys::godot_object) -> bool {
3938
use crate::ReferenceMethodTable;
40-
use std::ptr;
4139
let unref_method = ReferenceMethodTable::unchecked_get().unreference;
4240
let mut argument_buffer = [ptr::null() as *const libc::c_void; 0];
4341
let mut last_reference = false;
@@ -55,7 +53,6 @@ pub unsafe fn unref(obj: *mut sys::godot_object) -> bool {
5553
// This function assumes the godot_object is reference counted.
5654
pub unsafe fn init_ref_count(obj: *mut sys::godot_object) {
5755
use crate::ReferenceMethodTable;
58-
use std::ptr;
5956
let init_method = ReferenceMethodTable::unchecked_get().init_ref;
6057
let mut argument_buffer = [ptr::null() as *const libc::c_void; 0];
6158
let mut ok = false;

0 commit comments

Comments
 (0)