diff options
| author | 2026-02-20 22:37:34 +0800 | |
|---|---|---|
| committer | 2026-02-20 22:37:34 +0800 | |
| commit | 6cf63c5de9bb7f894d752caf72ab8326ac0c25da (patch) | |
| tree | 21f6e016d1db0b95109cae48f42645bd7309f3b9 /oid | |
| parent | object: I guess these checks are unnecessary (diff) | |
| signature | No signature | |
oid: Remove these unnecessary checks too
Diffstat (limited to 'oid')
| -rw-r--r-- | oid/objectid.go | 6 |
1 files changed, 0 insertions, 6 deletions
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]...) } |
