Skip to content

Commit

Permalink
Merge pull request #159 from rootulp/rp/error-checking-nit
Browse files Browse the repository at this point in the history
chore: address redundant error checking issue
  • Loading branch information
rootulp authored Apr 6, 2023
2 parents 0153b50 + 47bb5fb commit 1e85aab
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions extendeddatasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,7 @@ func (eds *ExtendedDataSquare) erasureExtendRow(codec Codec, i uint) error {
if err != nil {
return err
}
if err := eds.setRowSlice(i, eds.originalDataWidth, shares[len(shares)-int(eds.originalDataWidth):]); err != nil {
return err
}
return nil
return eds.setRowSlice(i, eds.originalDataWidth, shares[len(shares)-int(eds.originalDataWidth):])
}

func (eds *ExtendedDataSquare) erasureExtendCol(codec Codec, i uint) error {
Expand All @@ -175,10 +172,7 @@ func (eds *ExtendedDataSquare) erasureExtendCol(codec Codec, i uint) error {
if err != nil {
return err
}
if err := eds.setColSlice(eds.originalDataWidth, i, shares[len(shares)-int(eds.originalDataWidth):]); err != nil {
return err
}
return nil
return eds.setColSlice(eds.originalDataWidth, i, shares[len(shares)-int(eds.originalDataWidth):])
}

func (eds *ExtendedDataSquare) deepCopy(codec Codec) (ExtendedDataSquare, error) {
Expand Down

0 comments on commit 1e85aab

Please sign in to comment.