Skip to content

Commit

Permalink
GODRIVER-2698 Remove opt=nil case
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Nov 28, 2023
1 parent e107efd commit 78456f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions mongo/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -1643,10 +1643,6 @@ func (coll *Collection) Find(ctx context.Context, filter interface{},
}

func newFindOptionsFromFindOneOptions(opts ...*options.FindOneOptions) []*options.FindOptions {
if opts == nil {
return nil
}

findOpts := make([]*options.FindOptions, 0, len(opts))
for _, opt := range opts {
if opt == nil {
Expand Down
5 changes: 0 additions & 5 deletions mongo/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ func TestNewFindOptionsFromFindOneOptions(t *testing.T) {
opts []*options.FindOneOptions
want []*options.FindOptions
}{
{
name: "nil",
opts: nil,
want: nil,
},
{
name: "empty",
opts: []*options.FindOneOptions{},
Expand Down

0 comments on commit 78456f6

Please sign in to comment.