From 6cf63c5de9bb7f894d752caf72ab8326ac0c25da Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 20 Feb 2026 22:37:34 +0800 Subject: oid: Remove these unnecessary checks too --- oid/objectid.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'oid') diff --git a/oid/objectid.go b/oid/objectid.go index 92031d92..6507306e 100644 --- a/oid/objectid.go +++ b/oid/objectid.go @@ -141,18 +141,12 @@ func (id ObjectID) Size() int { // String returns the canonical hex representation. func (id ObjectID) String() string { size := id.Size() - if size == 0 { - return "" - } return hex.EncodeToString(id.data[:size]) } // Bytes returns a copy of the object ID bytes. func (id ObjectID) Bytes() []byte { size := id.Size() - if size == 0 { - return nil - } return append([]byte(nil), id.data[:size]...) } -- cgit v1.3.1-10-gc9f91