Skip to content

Commit

Permalink
update codec pb
Browse files Browse the repository at this point in the history
  • Loading branch information
hslam committed Jan 2, 2021
1 parent 2d7cd54 commit 284dcf5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions codec.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ func (req *pbRequest) Marshal() ([]byte, error) {
size := req.Size()
buf := make([]byte, size)
n, err := req.MarshalTo(buf[:size])
if err != nil {
return nil, err
}
return buf[:n], nil
return buf[:n], err
}

// MarshalTo marshals into buf and returns the number of bytes.
Expand Down Expand Up @@ -189,10 +186,7 @@ func (res *pbResponse) Marshal() ([]byte, error) {
size := res.Size()
buf := make([]byte, size)
n, err := res.MarshalTo(buf[:size])
if err != nil {
return nil, err
}
return buf[:n], nil
return buf[:n], err
}

// MarshalTo marshals into buf and returns the number of bytes.
Expand Down

0 comments on commit 284dcf5

Please sign in to comment.