File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ learn more about using cursors, see the :ref:`rust-cursor-guide` guide.
2525Example
2626-------
2727
28- This example retrieves documents from the ``restaurants`` collection in the
29- ``sample_restaurants`` database that match a query filter . The example uses a
30- ``Restaurant`` struct that has ``name`` and ``cuisine`` fields to model the documents
31- in the collection.
28+ This example retrieves documents that match a query filter from the ``restaurants``
29+ collection in the ``sample_restaurants`` database. The example uses a ``Restaurant``
30+ struct that has ``name`` and ``cuisine`` fields to model the documents in the
31+ collection.
3232
33- The following code passes a query filter as a parameter to the ``find()`` method. The
34- filter matches documents in which the value of the ``cuisine`` field is ``"French"``.
33+ The following code uses a query filter that matches documents in which the value
34+ of the ``cuisine`` field is ``"French"``.
3535
3636Select the **Asynchronous** or **Synchronous** tab to see the
3737corresponding code for each runtime:
Original file line number Diff line number Diff line change @@ -9,15 +9,14 @@ You can retrieve a single document in a collection by calling the `find_one()
99
1010Pass a query filter to the ``find_one()`` method to return one document in the collection
1111that matches the filter. If multiple documents match the query filter, this method returns
12- the first matching document according to their :term:`natural order` in the database, or
12+ the first matching document according to their :term:`natural order` in the database or
1313according to the sort order specified in a ``FindOneOptions`` instance.
1414
15- The ``find_one()`` method returns a `Result<Option<T>> <{+api+}/error/type.Result.html>`__
16- type.
15+ The ``find_one()`` method returns an `Option<T> <https://doc.rust-lang.org/nightly/core/option/enum.Option.html>`__
16+ type, where ``<T>`` is the type with which you parameterized your ``Collection``
17+ instance.
1718
18- .. tip::
19-
20- To learn more about retrieving documents, see the :ref:`rust-retrieve-guide` guide.
19+ To learn more about retrieving documents, see the :ref:`rust-retrieve-guide` guide.
2120
2221Example
2322-------
You can’t perform that action at this time.
0 commit comments