You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2026/01/23 11:25:55 UTC
(avro-rs) branch disable-testlogger-for-wasm32 created (now ccfa771)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a change to branch disable-testlogger-for-wasm32
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
at ccfa771 chore: Disable the build of TestLogger for WASM32
This branch includes the following new commits:
new ccfa771 chore: Disable the build of TestLogger for WASM32
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(avro-rs) 01/01: chore: Disable the build of TestLogger for WASM32
Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch disable-testlogger-for-wasm32
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit ccfa77117abdf5d8cb4c33c70758357ebb66c6b2
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Fri Jan 23 13:24:03 2026 +0200
chore: Disable the build of TestLogger for WASM32
Until now only the install() function was not compiled for WASM32 and
this led to the following warning at build time:
```
warning: struct `TestLogger` is never constructed
--> avro_test_helper/src/logger.rs:22:8
|
22 | struct TestLogger {
| ^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: function `test_logger` is never used
--> avro_test_helper/src/logger.rs:43:4
|
43 | fn test_logger() -> &'static TestLogger {
| ^^^^^^^^^^^
warning: `apache-avro-test-helper` (lib) generated 2 warnings
```
---
avro_test_helper/src/logger.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/avro_test_helper/src/logger.rs b/avro_test_helper/src/logger.rs
index 8617358..fe83238 100644
--- a/avro_test_helper/src/logger.rs
+++ b/avro_test_helper/src/logger.rs
@@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.
+#![cfg(not(target_arch = "wasm32"))]
+
use crate::LOG_MESSAGES;
use log::{LevelFilter, Log, Metadata};
use std::sync::OnceLock;
@@ -85,7 +87,6 @@ pub fn assert_logged(expected_message: &str) {
}
}
-#[cfg(not(target_arch = "wasm32"))]
pub(crate) fn install() {
log::set_logger(test_logger())
.map(|_| log::set_max_level(LevelFilter::Trace))