Remove printinfo global

This commit is contained in:
Filip Tibell 2023-05-24 11:21:48 +02:00
parent 73efb5fc99
commit 048b444859
No known key found for this signature in database
5 changed files with 3 additions and 13 deletions

View file

@ -207,7 +207,7 @@ print("Printing with pretty colors and auto-formatting 🎨")
print(stdio.color("blue") .. string.rep("", 22) .. stdio.color("reset"))
printinfo("API response:", apiResponse)
print("API response:", apiResponse)
warn({
Oh = {
No = {

View file

@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed `CollectionService` and its methods from the `roblox` builtin library - new instance methods have been added as replacements.
- Removed [`Instance:FindFirstDescendant`](https://create.roblox.com/docs/reference/engine/classes/Instance#FindFirstDescendant) which was a method that was never enabled in the official Roblox API and will soon be removed. <br/>
Use the second argument of the already existing find methods instead to find descendants.
- Removed the global `printinfo` function - it was generally not used, and did not work as intended. Use the `stdio` builtin for formatting and logging instead.
### Added

View file

@ -261,7 +261,7 @@ print("Printing with pretty colors and auto-formatting 🎨")
print(stdio.color("blue") .. string.rep("—", 22) .. stdio.color("reset"))
printinfo("API response:", apiResponse)
print("API response:", apiResponse)
warn({
Oh = {
No = {

View file

@ -14,16 +14,6 @@ pub fn print(lua: &Lua, args: LuaMultiValue) -> LuaResult<()> {
Ok(())
}
pub fn printinfo(lua: &Lua, args: LuaMultiValue) -> LuaResult<()> {
let print: LuaFunction = lua.named_registry_value("print")?;
print.call(format!(
"{}\n{}",
format_label("info"),
pretty_format_multi_value(&args)?
))?;
Ok(())
}
pub fn warn(lua: &Lua, args: LuaMultiValue) -> LuaResult<()> {
let print: LuaFunction = lua.named_registry_value("print")?;
print.call(format!(

View file

@ -37,7 +37,6 @@ pub fn create(lua: &'static Lua, args: Vec<String>) -> LuaResult<()> {
("print", lua.create_function(top_level::print)?),
("warn", lua.create_function(top_level::warn)?),
("error", lua.create_function(top_level::error)?),
("printinfo", lua.create_function(top_level::printinfo)?),
];
// Set top-level globals