Skip to content

Commit 17866ca

Browse files
committed
refactor: remove uneeded code and use struct literal syntax
1 parent 0e017d0 commit 17866ca

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mongo/client_encryption.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,9 @@ func (ce *ClientEncryption) RewrapManyDataKey(
465465
}
466466

467467
// Transfer rmdko options to /x/ package options to publish the mongocrypt feed.
468-
co := &mcopts.RewrapManyDataKeyOptions{}
468+
co := &mcopts.RewrapManyDataKeyOptions{
469+
Provider: args.Provider,
470+
}
469471
if args.MasterKey != nil {
470472
keyDoc, err := marshal(
471473
args.MasterKey,
@@ -476,9 +478,6 @@ func (ce *ClientEncryption) RewrapManyDataKey(
476478
}
477479
co.MasterKey = keyDoc
478480
}
479-
if args.Provider != nil {
480-
co.Provider = args.Provider
481-
}
482481

483482
// Prepare the filters and rewrap the data key using mongocrypt.
484483
filterdoc, err := marshal(filter, ce.keyVaultClient.bsonOpts, ce.keyVaultClient.registry)

0 commit comments

Comments
 (0)