Skip to content

Commit

Permalink
fixing usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jun 7, 2024
1 parent 56d2579 commit 20ee4df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ consider the following sample of code:
}
// if buf is an untrusted source, you should validate the result
// (this adds a bit of complexity but it is necessary for security)
if(!newrb.Validate()) {
if newrb.Validate() != nil {
fmt.Println("Failed validation") // return or panic
}
if ! rb.Equals(newrb) {
Expand Down
2 changes: 1 addition & 1 deletion example_roaring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestExample_roaring060(t *testing.T) {
}
// if buf is an untrusted source, you should validate the result
// (this adds a bit of complexity but it is necessary for security)
if !newrb.Validate() {
if newrb.Validate() != nil {
fmt.Println("Failed validation")
}
if !rb1.Equals(newrb) {
Expand Down

0 comments on commit 20ee4df

Please sign in to comment.