Skip to content

Commit a5cf411

Browse files
committed
Rename godot::extras -> godot::tools
1 parent b77af9b commit a5cf411

File tree

16 files changed

+35
-35
lines changed

16 files changed

+35
-35
lines changed

godot-codegen/src/special_cases/special_cases.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ pub fn maybe_rename_virtual_method(rust_method_name: &str) -> &str {
312312
pub fn get_class_extra_docs(class_name: &TyName) -> Option<&'static str> {
313313
match class_name.godot_ty.as_str() {
314314
"FileAccess" => {
315-
Some("The gdext library provides a higher-level abstraction, which should be preferred: [`GFile`][crate::extras::GFile].")
315+
Some("The gdext library provides a higher-level abstraction, which should be preferred: [`GFile`][crate::tools::GFile].")
316316
}
317317
"ScriptExtension" => {
318-
Some("Use this in combination with [`ScriptInstance`][crate::extras::ScriptInstance].")
318+
Some("Use this in combination with [`ScriptInstance`][crate::tools::ScriptInstance].")
319319
}
320320

321321
_ => None,
@@ -325,7 +325,7 @@ pub fn get_class_extra_docs(class_name: &TyName) -> Option<&'static str> {
325325
pub fn get_interface_extra_docs(trait_name: &str) -> Option<&'static str> {
326326
match trait_name {
327327
"IScriptExtension" => {
328-
Some("Use this in combination with [`ScriptInstance`][crate::extras::ScriptInstance].")
328+
Some("Use this in combination with [`ScriptInstance`][crate::tools::ScriptInstance].")
329329
}
330330

331331
_ => None,

godot-core/src/engine/mod.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
66
*/
77

8-
#![deprecated = "Module has been split into `godot::classes`, `godot::global` and `godot::extras`."]
8+
#![deprecated = "Module has been split into `godot::classes`, `godot::global` and `godot::tools`."]
99

1010
#[deprecated = "Classes have been moved to `godot::classes`."]
1111
pub use crate::classes::*;
@@ -26,34 +26,34 @@ pub mod native {
2626
pub use crate::gen::native::*;
2727
}
2828

29-
#[deprecated = "`godot::classes::translate` has been moved to `godot::extras`."]
29+
#[deprecated = "`godot::classes::translate` has been moved to `godot::tools`."]
3030
pub mod translate {
31-
pub use crate::extras::{tr, tr_n};
31+
pub use crate::tools::{tr, tr_n};
3232
}
3333

34-
#[deprecated = "`create_script_instance` has been moved to `godot::extras`."]
35-
pub use crate::extras::create_script_instance;
34+
#[deprecated = "`create_script_instance` has been moved to `godot::tools`."]
35+
pub use crate::tools::create_script_instance;
3636

37-
#[deprecated = "`ScriptInstance` has been moved to `godot::extras`."]
38-
pub use crate::extras::ScriptInstance;
37+
#[deprecated = "`ScriptInstance` has been moved to `godot::tools`."]
38+
pub use crate::tools::ScriptInstance;
3939

40-
#[deprecated = "`SiMut` has been moved to `godot::extras`."]
41-
pub use crate::extras::SiMut;
40+
#[deprecated = "`SiMut` has been moved to `godot::tools`."]
41+
pub use crate::tools::SiMut;
4242

43-
#[deprecated = "`GFile` has been moved to `godot::extras`."]
44-
pub use crate::extras::GFile;
43+
#[deprecated = "`GFile` has been moved to `godot::tools`."]
44+
pub use crate::tools::GFile;
4545

46-
#[deprecated = "`IoError` has been moved to `godot::extras`."]
47-
pub use crate::extras::IoError;
46+
#[deprecated = "`IoError` has been moved to `godot::tools`."]
47+
pub use crate::tools::IoError;
4848

4949
#[deprecated = "`save` has been moved to `godot::global`."]
50-
pub use crate::extras::save;
50+
pub use crate::tools::save;
5151

5252
#[deprecated = "`try_save` has been moved to `godot::global`."]
53-
pub use crate::extras::try_save;
53+
pub use crate::tools::try_save;
5454

5555
#[deprecated = "`load` has been moved to `godot::global`."]
56-
pub use crate::extras::load;
56+
pub use crate::tools::load;
5757

5858
#[deprecated = "`try_load` has been moved to `godot::global`."]
59-
pub use crate::extras::try_load;
59+
pub use crate::tools::try_load;

godot-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub mod engine;
3838
///
3939
/// Contains functionality that extends existing Godot classes and functions, to make them more versatile
4040
/// or better integrated with Rust.
41-
pub mod extras;
41+
pub mod tools;
4242

4343
// Output of generated code. Mimics the file structure, symbols are re-exported.
4444
#[rustfmt::skip]

godot-core/src/obj/guards.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use godot_ffi::out;
1111
use std::fmt::Debug;
1212
use std::ops::{Deref, DerefMut};
1313

14-
use crate::extras::ScriptInstance;
1514
use crate::obj::{Gd, GodotClass};
15+
use crate::tools::ScriptInstance;
1616

1717
/// Immutably/shared bound reference guard for a [`Gd`][crate::obj::Gd] smart pointer.
1818
///

godot-core/src/extras/gfile.rs renamed to godot-core/src/tools/gfile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
use crate::builtin::{real, GString, PackedByteArray, PackedStringArray, Variant};
99
use crate::classes::file_access::{CompressionMode, ModeFlags};
1010
use crate::classes::FileAccess;
11-
use crate::extras::IoError;
1211
use crate::global::Error;
1312
use crate::obj::Gd;
13+
use crate::tools::IoError;
1414

1515
use std::cmp;
1616
use std::io::{BufRead, ErrorKind, Read, Seek, SeekFrom, Write};
@@ -50,7 +50,7 @@ use std::io::{BufRead, ErrorKind, Read, Seek, SeekFrom, Write};
5050
/// ```no_run
5151
/// use godot::builtin::GString;
5252
/// use godot::classes::file_access::ModeFlags;
53-
/// use godot::extras::GFile;
53+
/// use godot::tools::GFile;
5454
///
5555
/// fn save_game() -> Result<(), std::io::Error> {
5656
///
File renamed without changes.
File renamed without changes.

godot-core/src/extras/save_load.rs renamed to godot-core/src/tools/save_load.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
use crate::builtin::GString;
99
use crate::classes::{Resource, ResourceLoader, ResourceSaver};
10-
use crate::extras::IoError;
1110
use crate::global::Error as GodotError;
1211
use crate::obj::{Gd, Inherits};
12+
use crate::tools::IoError;
1313

1414
/// ⚠️ Loads a resource from the filesystem located at `path`, panicking on error.
1515
///

godot-core/src/extras/script_instance.rs renamed to godot-core/src/tools/script_instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl<'a, T: ScriptInstance> SiMut<'a, T> {
294294
/// ```no_run
295295
/// # use godot::prelude::*;
296296
/// # use godot::classes::{ScriptLanguage, Script};
297-
/// # use godot::extras::{ScriptInstance, SiMut};
297+
/// # use godot::tools::{ScriptInstance, SiMut};
298298
/// # use godot::builtin::meta::{MethodInfo, PropertyInfo};
299299
/// # use godot::sys;
300300
/// struct ExampleScriptInstance;
@@ -342,7 +342,7 @@ impl<'a, T: ScriptInstance> SiMut<'a, T> {
342342
/// ```no_run
343343
/// # use godot::prelude::*;
344344
/// # use godot::classes::{ScriptLanguage, Script};
345-
/// # use godot::extras::{ScriptInstance, SiMut};
345+
/// # use godot::tools::{ScriptInstance, SiMut};
346346
/// # use godot::builtin::meta::{MethodInfo, PropertyInfo};
347347
/// # use godot::sys;
348348
/// struct ExampleScriptInstance;

godot-core/src/extras/translate.rs renamed to godot-core/src/tools/translate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub use crate::{tr, tr_n};
2222
/// # let a = Vector2i { x: 0, y: 0 };
2323
/// # let b = Vector2i { x: 0, y: 0 };
2424
/// # let context = "context";
25-
/// use godot::extras::tr;
25+
/// use godot::tools::tr;
2626
///
2727
/// // Good.
2828
/// tr!(context; "{a} is a {b}"); // inlined, with context
@@ -65,7 +65,7 @@ macro_rules! tr {
6565
/// # let b = Vector2i { x: 0, y: 0 };
6666
/// # let context = "context";
6767
/// # let n = 2;
68-
/// use godot::extras::tr_n;
68+
/// use godot::tools::tr_n;
6969
///
7070
/// // Good.
7171
/// tr_n!(n, context; "{a} is a {b}", "{a}s are {b}s"); // inlined, with context

0 commit comments

Comments
 (0)