Skip to content

Commit 901d626

Browse files
committed
Move tools::IoError -> meta::error::IoError
1 parent 3d7575f commit 901d626

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

godot-core/src/engine/mod.rs renamed to godot-core/src/engine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ pub use crate::obj::script::SiMut;
4141
#[deprecated = "`GFile` has been moved to `godot::tools`."]
4242
pub use crate::tools::GFile;
4343

44-
#[deprecated = "`IoError` has been moved to `godot::tools`."]
45-
pub use crate::tools::IoError;
44+
#[deprecated = "`IoError` has been moved to `godot::meta::error`."]
45+
pub use crate::meta::error::IoError;
4646

4747
#[deprecated = "`save` has been moved to `godot::global`."]
4848
pub use crate::tools::save;

godot-core/src/tools/io_error.rs renamed to godot-core/src/meta/error/io_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use std::error::Error;
99
use std::fmt;
1010

11-
use crate::gen::classes::FileAccess;
11+
use crate::classes::FileAccess;
1212
use crate::global::Error as GodotError;
1313
use crate::obj::Gd;
1414

godot-core/src/meta/error/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
1010
mod call_error;
1111
mod convert_error;
12+
mod io_error;
1213

1314
pub use call_error::*;
1415
pub use convert_error::*;
16+
pub use io_error::*;

godot-core/src/tools/gfile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::classes::file_access::{CompressionMode, ModeFlags};
1010
use crate::classes::FileAccess;
1111
use crate::global::Error;
1212
use crate::obj::Gd;
13-
use crate::tools::IoError;
1413

14+
use crate::engine::IoError;
1515
use std::cmp;
1616
use std::io::{BufRead, ErrorKind, Read, Seek, SeekFrom, Write};
1717

godot-core/src/tools/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
//! or better integrated with Rust.
1212
1313
mod gfile;
14-
mod io_error;
1514
mod save_load;
1615
mod translate;
1716

1817
pub use gfile::*;
19-
pub use io_error::*;
2018
pub use save_load::*;
2119
pub use translate::*;

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::engine::IoError;
1011
use crate::global::Error as GodotError;
1112
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/src/prelude.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ pub use super::register::{godot_api, Export, GodotClass, GodotConvert, Var};
1212

1313
pub use super::builtin::__prelude_reexport::*;
1414
pub use super::builtin::math::FloatExt as _;
15-
pub use super::meta::{FromGodot, ToGodot};
15+
pub use super::meta::error::{ConvertError, IoError};
16+
pub use super::meta::{FromGodot, GodotConvert, ToGodot};
1617

1718
pub use super::classes::{
1819
AudioStreamPlayer, Camera2D, Camera3D, IAudioStreamPlayer, ICamera2D, ICamera3D, INode,
@@ -22,7 +23,7 @@ pub use super::classes::{
2223
pub use super::global::{
2324
godot_error, godot_print, godot_print_rich, godot_script_error, godot_warn,
2425
};
25-
pub use super::tools::{load, save, try_load, try_save, GFile, IoError};
26+
pub use super::tools::{load, save, try_load, try_save, GFile};
2627

2728
pub use super::init::{gdextension, ExtensionLibrary, InitLevel};
2829
pub use super::obj::{Base, Gd, GdMut, GdRef, GodotClass, Inherits, InstanceId, OnReady};

0 commit comments

Comments
 (0)