@@ -544,8 +544,7 @@ pub struct AggregateOptions {
544
544
/// Tags the query with an arbitrary [`Bson`] value to help trace the operation through the
545
545
/// database profiler, currentOp and logs.
546
546
///
547
- /// This option is only supported on server versions 4.4+. Use the `comment` option on
548
- /// older server versions.
547
+ /// For server versions less than 4.4, only a string value may be provided.
549
548
pub comment : Option < Bson > ,
550
549
551
550
/// The index to use for the operation.
@@ -767,22 +766,11 @@ pub struct FindOptions {
767
766
#[ serde( serialize_with = "serde_util::serialize_u32_option_as_i32" ) ]
768
767
pub batch_size : Option < u32 > ,
769
768
770
- /// Tags the query with an arbitrary string to help trace the operation through the
771
- /// database profiler, currentOp and logs.
772
- ///
773
- /// If both this option and `comment_bson` are specified, `comment_bson` will take precedence.
774
- // TODO RUST-1364: Update this field to be of type Option<Bson>
775
- #[ serde( skip_serializing) ]
776
- pub comment : Option < String > ,
777
-
778
769
/// Tags the query with an arbitrary [`Bson`] value to help trace the operation through the
779
770
/// database profiler, currentOp and logs.
780
771
///
781
- /// This option is only supported on server versions 4.4+. Use the `comment` option on
782
- /// older server versions.
783
- // TODO RUST-1364: Remove this field
784
- #[ serde( rename( serialize = "comment" ) ) ]
785
- pub comment_bson : Option < Bson > ,
772
+ /// For server versions less than 4.4, only a string value may be provided.
773
+ pub comment : Option < Bson > ,
786
774
787
775
/// The type of cursor to return.
788
776
#[ serde( skip) ]
@@ -878,7 +866,6 @@ impl From<FindOneOptions> for FindOptions {
878
866
allow_partial_results : options. allow_partial_results ,
879
867
collation : options. collation ,
880
868
comment : options. comment ,
881
- comment_bson : options. comment_bson ,
882
869
hint : options. hint ,
883
870
max : options. max ,
884
871
max_scan : options. max_scan ,
@@ -932,20 +919,11 @@ pub struct FindOneOptions {
932
919
/// information on how to use this option.
933
920
pub collation : Option < Collation > ,
934
921
935
- /// Tags the query with an arbitrary string value to help trace the operation through the
936
- /// database profiler, currentOp and logs.
937
- ///
938
- /// If both this option and `comment_bson` are specified, `comment_bson` will take precedence.
939
- // TODO RUST-1364: Update this field to be of type Option<Bson>
940
- pub comment : Option < String > ,
941
-
942
922
/// Tags the query with an arbitrary [`Bson`] value to help trace the operation through the
943
923
/// database profiler, currentOp and logs.
944
924
///
945
- /// This option is only supported on server versions 4.4+. Use the `comment` option on
946
- /// older server versions.
947
- // TODO RUST-1364: Remove this field
948
- pub comment_bson : Option < Bson > ,
925
+ /// For server versions less than 4.4, only a string value may be provided.
926
+ pub comment : Option < Bson > ,
949
927
950
928
/// The index to use for the operation.
951
929
pub hint : Option < Hint > ,
0 commit comments