Skip to content

Commit 3b4412a

Browse files
committed
Fix spelling in comments
1 parent 57940d0 commit 3b4412a

File tree

1 file changed

+5
-5
lines changed
  • src/libstd/collections/hash

1 file changed

+5
-5
lines changed

src/libstd/collections/hash/map.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ impl DefaultResizePolicy {
182182
// ----------------------
183183
// To protect against degenerate performance scenarios (including DOS attacks),
184184
// the implementation includes an adaptive behavior that can resize the map
185-
// early (before it's capacity is exceeded) when suspiciously long probe or
186-
// foward shifts sequences are encounted.
185+
// early (before its capacity is exceeded) when suspiciously long probe or
186+
// forward shifts sequences are encountered.
187187
//
188188
// With this algorithm in place it would be possible to turn a CPU attack into
189-
// a memory attack due to the agressive resizing. To prevent that the
189+
// a memory attack due to the aggressive resizing. To prevent that the
190190
// adaptive behavior only triggers when the map occupancy is half the maximum occupancy.
191-
// This reduces the effectivenes of the algorithm but also makes it completelly safe.
191+
// This reduces the effectiveness of the algorithm but also makes it completely safe.
192192
//
193-
// The previous safety measure that also prevents degenerate iteractions with
193+
// The previous safety measure also prevents degenerate interactions with
194194
// really bad quality hash algorithms that can make normal inputs look like a
195195
// DOS attack.
196196
//

0 commit comments

Comments
 (0)