Skip to content

Commit

Permalink
chore(build): Avoid baking Rust identifier into version string twice
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 19, 2023
1 parent ad5f09a commit f5114d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub fn inject_version(lua: &Lua) {
let sile: LuaTable = lua.globals().get("SILE").unwrap();
let mut full_version: String = sile.get("full_version").unwrap();
full_version.push_str(" [Rust]");
sile.set("full_version", full_version).unwrap();
}

pub fn load_sile(lua: &Lua) {
Expand All @@ -64,8 +65,7 @@ pub fn load_sile(lua: &Lua) {
pub fn version() -> crate::Result<String> {
let lua = start_luavm()?;
let sile: LuaTable = lua.globals().get("SILE").unwrap();
let mut full_version: String = sile.get("full_version").unwrap();
full_version.push_str(" [Rust]");
let full_version: String = sile.get("full_version").unwrap();
Ok(full_version)
}

Expand Down

0 comments on commit f5114d3

Please sign in to comment.