Skip to content

Commit 609ba8f

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/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 <rust-lang/rust#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
1 parent c0ff721 commit 609ba8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn bump(version: String) -> Result<()> {
265265
if let Some(hooks) = &hooks {
266266
if let Some(pre_func) = hooks.get("pre_func") {
267267
pre_func
268-
.call(())
268+
.call::<_, ()>(())
269269
.map_err(|source| Error::LuaPreFuncFailed { source })?;
270270
}
271271
}
@@ -275,7 +275,7 @@ fn bump(version: String) -> Result<()> {
275275
if let Some(hooks) = &hooks {
276276
if let Some(post_func) = hooks.get("post_func") {
277277
post_func
278-
.call(())
278+
.call::<_, ()>(())
279279
.map_err(|source| Error::LuaPostFuncFailed { source })?;
280280
}
281281
}

0 commit comments

Comments
 (0)