Skip to content

Comments

Don't attempt to hang a prefix string unnecessarily#545

Merged
JohnnyMorganz merged 8 commits intomainfrom
hang-prefix-ignore-string
Aug 21, 2022
Merged

Don't attempt to hang a prefix string unnecessarily#545
JohnnyMorganz merged 8 commits intomainfrom
hang-prefix-ignore-string

Conversation

@JohnnyMorganz
Copy link
Owner

Fixes #508

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #545 (2b704e6) into main (78ec64f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #545   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files          14       14           
  Lines        5416     5422    +6     
=======================================
+ Hits         5297     5303    +6     
  Misses        119      119           
Impacted Files Coverage Δ
src/formatters/expression.rs 98.11% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions

This comment was marked as outdated.

@github-actions
Copy link
Contributor

Repo Comparison Test

diff --git ORI/roact/src/Config.lua ALT/roact/src/Config.lua
index d97c8dc..8d1b3d5 100644
--- ORI/roact/src/Config.lua
+++ ALT/roact/src/Config.lua
@@ -82,9 +82,11 @@ function Config:set(configValues)
 
 		-- Right now, all configuration values must be boolean.
 		if typeof(value) ~= "boolean" then
-			local message = (
-				"Invalid value %q (type %s) for global configuration key %q. Valid values are: true, false"
-			):format(tostring(value), typeof(value), tostring(key))
+			local message = ("Invalid value %q (type %s) for global configuration key %q. Valid values are: true, false"):format(
+				tostring(value),
+				typeof(value),
+				tostring(key)
+			)
 
 			error(message, 3)
 		end
diff --git ORI/luvit/tests/test-url.lua ALT/luvit/tests/test-url.lua
index 105e660..88a1867 100644
--- ORI/luvit/tests/test-url.lua
+++ ALT/luvit/tests/test-url.lua
@@ -86,7 +86,11 @@ local relativeTests = {
 		"https://u:p@h.com/p/a/t/h?s#hash2",
 	},
 	{ "http://example.com/b//c//d;p?q#blarg", "https://a/b/c/d", "https://a/b/c/d" },
-	{ "http://example.com/b//c//d;p?q#blarg", "http://u:p@h.com/p/a/t/h?s#hash2", "http://u:p@h.com/p/a/t/h?s#hash2" },
+	{
+		"http://example.com/b//c//d;p?q#blarg",
+		"http://u:p@h.com/p/a/t/h?s#hash2",
+		"http://u:p@h.com/p/a/t/h?s#hash2",
+	},
 	{ "/foo/bar/baz", "/../etc/passwd", "/etc/passwd" },
 	{ "http://localhost", "file://foo/Users", "file://foo/Users" },
 	-- from node
diff --git ORI/lit/commands/serve.lua ALT/lit/commands/serve.lua
index 38e6078..e453aa3 100644
--- ORI/lit/commands/serve.lua
+++ ALT/lit/commands/serve.lua
@@ -37,11 +37,10 @@ return function()
 		end
 	end)
 
-	app.use(require("weblit-auto-headers"))
-.route({ method = "GET", path = "/snapshots" }, require("snapshots")).route(
-		{ method = "GET", path = "/stats" },
-		require("stats")
-	)
+	app
+		.use(require("weblit-auto-headers"))
+		.route({ method = "GET", path = "/snapshots" }, require("snapshots"))
+		.route({ method = "GET", path = "/stats" }, require("stats"))
 
 	-- Handle websocket clients
 	app.websocket({
diff --git ORI/lit/deps/ssh-rsa.lua ALT/lit/deps/ssh-rsa.lua
index 17bc6bf..ac1f3ae 100644
--- ORI/lit/deps/ssh-rsa.lua
+++ ALT/lit/deps/ssh-rsa.lua
@@ -45,25 +45,27 @@ do
 	function dec(data)
 		data = string.gsub(data, "[^" .. chars .. "=]", "")
 		return (
-			data:gsub(".", function(x)
-				if x == "=" then
-					return ""
-				end
-				local r, f = "", (chars:find(x) - 1)
-				for i = 6, 1, -1 do
-					r = r .. (f % 2 ^ i - f % 2 ^ (i - 1) > 0 and "1" or "0")
-				end
-				return r
-			end):gsub("%d%d%d?%d?%d?%d?%d?%d?", function(x)
-				if #x ~= 8 then
-					return ""
-				end
-				local c = 0
-				for i = 1, 8 do
-					c = c + (x:sub(i, i) == "1" and 2 ^ (8 - i) or 0)
-				end
-				return string.char(c)
-			end)
+			data
+				:gsub(".", function(x)
+					if x == "=" then
+						return ""
+					end
+					local r, f = "", (chars:find(x) - 1)
+					for i = 6, 1, -1 do
+						r = r .. (f % 2 ^ i - f % 2 ^ (i - 1) > 0 and "1" or "0")
+					end
+					return r
+				end)
+				:gsub("%d%d%d?%d?%d?%d?%d?%d?", function(x)
+					if #x ~= 8 then
+						return ""
+					end
+					local c = 0
+					for i = 1, 8 do
+						c = c + (x:sub(i, i) == "1" and 2 ^ (8 - i) or 0)
+					end
+					return string.char(c)
+				end)
 		)
 	end
 end

@JohnnyMorganz
Copy link
Owner Author

@matthargett thoughts on the Roact diff?

Copy link

@matthargett matthargett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JohnnyMorganz JohnnyMorganz merged commit 760737f into main Aug 21, 2022
@JohnnyMorganz JohnnyMorganz deleted the hang-prefix-ignore-string branch August 21, 2022 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect line break on assignment of function

2 participants