Skip to content

Commit

Permalink
simplify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup committed Jul 21, 2023
1 parent 14024a4 commit e980045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/bson/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func (a *arrayType) ReadFrom(r *bufio.Reader) error {

// readNested, similarly to ReadFrom, takes raw bytes from reader
// and unmarshal them to the arrayType.
// It also takes the nesting value (if called from different bsontype),
// and checks if the document doesn't exceed the max nesting allowed.
// It also takes the nesting value, and checks if the
// document doesn't exceed the max nesting allowed.
func (a *arrayType) readNested(r *bufio.Reader, nesting int) error {
if nesting > maxNesting {
return lazyerrors.Errorf("bson.Array.ReadFrom (document has exceeded the max supported nesting: %d)", maxNesting)
Expand Down
4 changes: 2 additions & 2 deletions internal/bson/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ func (doc *Document) ReadFrom(r *bufio.Reader) error {

// readNested, similarly to ReadFrom, takes raw bytes from reader
// and unmarshal them to the Document.
// It also takes the nesting value (if called from different bsontype),
// and checks if the document doesn't exceed the max nesting allowed.
// It also takes the nesting value, and checks if the
// document doesn't exceed the max nesting allowed.
func (doc *Document) readNested(r *bufio.Reader, nesting int) error {
if nesting > maxNesting {
return fmt.Errorf("bson.Document.ReadFrom (document has exceeded the max supported nesting: %d)", maxNesting)
Expand Down

0 comments on commit e980045

Please sign in to comment.