From adc6b2b20705333e9339f340c98e41edd55c897a Mon Sep 17 00:00:00 2001 From: Chitose Yuuzaki Date: Tue, 19 Oct 2021 09:35:22 +0000 Subject: [PATCH] Re-export `gdnative_core::log` again Types and functions in the `log` module should remain visible and part of the public API: - `Site` is the return type of the trait method `Method::site`, and is necessary to name when implementing the trait manually e.g. for a generic method. - `print`, `warn` and `error` are safe high-level bindings to the native logging facilities that aren't available elsewhere, and are worthwhile to expose for custom `log` backend implementations that want to use call site information from the logging framework instead. --- gdnative-core/src/lib.rs | 1 - gdnative/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gdnative-core/src/lib.rs b/gdnative-core/src/lib.rs index 593d52f6f..6fa302aea 100644 --- a/gdnative-core/src/lib.rs +++ b/gdnative-core/src/lib.rs @@ -45,7 +45,6 @@ pub mod core_types; #[cfg(feature = "nativescript")] pub mod nativescript; -#[doc(hidden)] pub mod log; pub mod object; diff --git a/gdnative/src/lib.rs b/gdnative/src/lib.rs index 705d4740d..33d74d6ed 100644 --- a/gdnative/src/lib.rs +++ b/gdnative/src/lib.rs @@ -58,7 +58,7 @@ // Items, which are #[doc(hidden)] in their original crate and re-exported with a wildcard, lose // their hidden status. Re-exporting them manually and hiding the wildcard solves this. #[doc(inline)] -pub use gdnative_core::{core_types, nativescript, object}; +pub use gdnative_core::{core_types, log, nativescript, object}; /// Collection of declarative `godot_*` macros, mostly for GDNative registration and output. pub mod macros {