@@ -291,7 +291,8 @@ impl<T, S> HashSet<T, S>
291
291
Iter { iter : self . map . keys ( ) }
292
292
}
293
293
294
- /// Visit the values representing the difference.
294
+ /// Visit the values representing the difference,
295
+ /// i.e. the values that are in `self` but not in `other`.
295
296
///
296
297
/// # Examples
297
298
///
@@ -321,7 +322,8 @@ impl<T, S> HashSet<T, S>
321
322
}
322
323
}
323
324
324
- /// Visit the values representing the symmetric difference.
325
+ /// Visit the values representing the symmetric difference,
326
+ /// i.e. the values that are in `self` or in `other` but not in both.
325
327
///
326
328
/// # Examples
327
329
///
@@ -348,7 +350,8 @@ impl<T, S> HashSet<T, S>
348
350
SymmetricDifference { iter : self . difference ( other) . chain ( other. difference ( self ) ) }
349
351
}
350
352
351
- /// Visit the values representing the intersection.
353
+ /// Visit the values representing the intersection,
354
+ /// i.e. the values that are both in `self` and `other`.
352
355
///
353
356
/// # Examples
354
357
///
@@ -373,7 +376,8 @@ impl<T, S> HashSet<T, S>
373
376
}
374
377
}
375
378
376
- /// Visit the values representing the union.
379
+ /// Visit the values representing the union,
380
+ /// i.e. all the values in `self` or `other`, without duplicates.
377
381
///
378
382
/// # Examples
379
383
///
@@ -489,7 +493,7 @@ impl<T, S> HashSet<T, S>
489
493
Recover :: get ( & self . map , value)
490
494
}
491
495
492
- /// Returns `true` if the set has no elements in common with `other`.
496
+ /// Returns `true` if `self` has no elements in common with `other`.
493
497
/// This is equivalent to checking for an empty intersection.
494
498
///
495
499
/// # Examples
@@ -511,7 +515,8 @@ impl<T, S> HashSet<T, S>
511
515
self . iter ( ) . all ( |v| !other. contains ( v) )
512
516
}
513
517
514
- /// Returns `true` if the set is a subset of another.
518
+ /// Returns `true` if the set is a subset of another,
519
+ /// i.e. `other` contains at least all the values in `self`.
515
520
///
516
521
/// # Examples
517
522
///
@@ -532,7 +537,8 @@ impl<T, S> HashSet<T, S>
532
537
self . iter ( ) . all ( |v| other. contains ( v) )
533
538
}
534
539
535
- /// Returns `true` if the set is a superset of another.
540
+ /// Returns `true` if the set is a superset of another,
541
+ /// i.e. `self` contains at least all the values in `other`.
536
542
///
537
543
/// # Examples
538
544
///
0 commit comments