]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #101330 - wkordalski:hashset-drain-doc, r=jyn514
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Sat, 3 Sep 2022 05:03:07 +0000 (10:33 +0530)
committerGitHub <noreply@github.com>
Sat, 3 Sep 2022 05:03:07 +0000 (10:33 +0530)
Fix `std::collections::HashSet::drain` documentation

Hi!

`std::collections::HashSet::drain` contains small typo in the docstring.

I didn't read too much about the model of contributing to Rust, so merge this PR or close and fix the typo the right way :)

Thanks for Rust!

library/std/src/collections/hash/set.rs

index abff82788a38dc55d9a8cfbb3b5900c5ea9ac53d..5b6a415fadc1e2a83f737adbbdb6b95522553a7d 100644 (file)
@@ -239,7 +239,7 @@ pub fn is_empty(&self) -> bool {
     ///
     /// If the returned iterator is dropped before being fully consumed, it
     /// drops the remaining elements. The returned iterator keeps a mutable
-    /// borrow on the vector to optimize its implementation.
+    /// borrow on the set to optimize its implementation.
     ///
     /// # Examples
     ///