Skip to content

Commit a10e103

Browse files
committed
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/lib.rs:220:1 | 220 | 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 <rust-lang/rust#123748> = help: specify the types explicitly note: in edition 2024, the requirement `!: LuaUserData` will fail --> src/lib.rs:241:22 | 241 | .call(()) | ^^^^ = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
1 parent 1999798 commit a10e103

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ fn bump(version: String) -> Result<()> {
238238
if let Some(hooks) = &hooks {
239239
if let Some(pre_func) = hooks.get("pre_func") {
240240
pre_func
241-
.call(())
241+
.call::<_, ()>(())
242242
.map_err(|source| Error::LuaPreFuncFailed { source })?;
243243
}
244244
}
@@ -248,7 +248,7 @@ fn bump(version: String) -> Result<()> {
248248
if let Some(hooks) = &hooks {
249249
if let Some(post_func) = hooks.get("post_func") {
250250
post_func
251-
.call(())
251+
.call::<_, ()>(())
252252
.map_err(|source| Error::LuaPostFuncFailed { source })?;
253253
}
254254
}

0 commit comments

Comments
 (0)