svn commit: r329585 - head/stand/lua

Alexander Nasonov alnsn at yandex.ru
Mon Feb 19 21:55:11 UTC 2018


Kyle Evans wrote:
> +function core.isSingleUserBoot()
> +	local single_user = loader.getenv("boot_single");
> +	return single_user ~= nil and single_user:lower() == "yes";
> +end

Just curious, why do you end all lines with semi-colons? It's not very
common in Lua code.

This version looks more idiomatic:

function core.isSingleUserBoot()
	local single_user = loader.getenv("boot_single")
	return single_user and single_user:lower() == "yes"
end

-- 
Alex


More information about the svn-src-all mailing list