From d514978d584305ae427f46c1fcafca41a3db8759 Mon Sep 17 00:00:00 2001 From: Daspoet Date: Sun, 29 Aug 2021 00:26:05 +0200 Subject: [PATCH] refactor(snowflake): remove unnecessary error check --- snowflake.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/snowflake.go b/snowflake.go index 7029482..fe39d5e 100644 --- a/snowflake.go +++ b/snowflake.go @@ -75,10 +75,9 @@ func (s *Snowflake) UnmarshalJSON(data []byte) error { typ: "int or string", } } - if err == nil { - *s = Snowflake(parsed) - } - return err + + *s = Snowflake(parsed) + return nil } // MarshalJSON returns the JSON representation of s.