diff options
| author | Florian Hahn <flo@fhahn.com> | 2015-11-20 11:39:28 +0100 |
|---|---|---|
| committer | Florian Hahn <flo@fhahn.com> | 2015-11-20 11:40:05 +0100 |
| commit | 755caf9ff7e6ae242c48dbd28bfd6e5c3f070f97 (patch) | |
| tree | 57e9bd9afe49d9a0d585451bc222b6cae70181b1 /src/libstd | |
| parent | 3e48b0e380319dc586a329baac640b9457feb87a (diff) | |
| download | rust-755caf9ff7e6ae242c48dbd28bfd6e5c3f070f97.tar.gz rust-755caf9ff7e6ae242c48dbd28bfd6e5c3f070f97.zip | |
Rename result variable in HashSet's intersection and union examples
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 0021155b00a..daabb0f9fa8 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -348,8 +348,8 @@ impl<T, S> HashSet<T, S> /// println!("{}", x); /// } /// - /// let diff: HashSet<_> = a.intersection(&b).cloned().collect(); - /// assert_eq!(diff, [2, 3].iter().cloned().collect()); + /// let intersection: HashSet<_> = a.intersection(&b).cloned().collect(); + /// assert_eq!(intersection, [2, 3].iter().cloned().collect()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S> { @@ -373,8 +373,8 @@ impl<T, S> HashSet<T, S> /// println!("{}", x); /// } /// - /// let diff: HashSet<_> = a.union(&b).cloned().collect(); - /// assert_eq!(diff, [1, 2, 3, 4].iter().cloned().collect()); + /// let union: HashSet<_> = a.union(&b).cloned().collect(); + /// assert_eq!(union, [1, 2, 3, 4].iter().cloned().collect()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] pub fn union<'a>(&'a self, other: &'a HashSet<T, S>) -> Union<'a, T, S> { |
