Skip to content

Commit

Permalink
work around nightly gleam formatter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
inoas committed May 11, 2024
1 parent 9ab8401 commit b2f5fef
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/gleam_community/colour.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,8 @@ pub fn to_hsla(colour: Colour) -> #(Float, Float, Float, Float) {
pub fn to_css_rgba_string(colour: Colour) -> String {
let #(r, g, b, a) = to_rgba(colour)

let percent = fn(
x: Float,
let percent = fn(x: Float) -> Float {
// This won't fail because we are always dividing by 100.0
) -> Float {
let assert Ok(p) =
x
|> float.multiply(10_000.0)
Expand All @@ -715,10 +713,8 @@ pub fn to_css_rgba_string(colour: Colour) -> String {
p
}

let round_to = fn(
x: Float,
let round_to = fn(x: Float) -> Float {
// This won't fail because we are always dividing by 1000.0
) -> Float {
let assert Ok(r) =
x
|> float.multiply(1000.0)
Expand Down

0 comments on commit b2f5fef

Please sign in to comment.