From 609ba8f3cb52a0903bbfb17751af718dc9c85e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Gamb=C3=B6ck?= Date: Sat, 11 Jan 2025 18:12:06 +0100 Subject: [PATCH] Fix compiler warning regarding future errors As preparation for an upcoming Rust compiler release, the following warning was generated and needed to be fixed: warning: this function depends on never type fallback being `()` --> src/main.rs:247:1 | 247 | fn bump(version: String) -> Result<()> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #123748 = help: specify the types explicitly note: in edition 2024, the requirement `!: LuaUserData` will fail --> src/main.rs:268:22 | 268 | .call(()) | ^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2b5e4cc..66421a3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -265,7 +265,7 @@ fn bump(version: String) -> Result<()> { if let Some(hooks) = &hooks { if let Some(pre_func) = hooks.get("pre_func") { pre_func - .call(()) + .call::<_, ()>(()) .map_err(|source| Error::LuaPreFuncFailed { source })?; } } @@ -275,7 +275,7 @@ fn bump(version: String) -> Result<()> { if let Some(hooks) = &hooks { if let Some(post_func) = hooks.get("post_func") { post_func - .call(()) + .call::<_, ()>(()) .map_err(|source| Error::LuaPostFuncFailed { source })?; } }