Skip to content

Commit e61b1f9

Browse files
Shimuuarkonsumlamm
andcommitted
Fix comments
Co-authored-by: konsumlamm <[email protected]>
1 parent e04d022 commit e61b1f9

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

vector/src/Data/Vector.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,11 @@ fromList :: [a] -> Vector a
21192119
{-# INLINE fromList #-}
21202120
fromList = G.fromList
21212121

2122-
-- | /O(n)/ Convert the first @n@ elements of a list to a vector.
2122+
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
2123+
-- expected that the supplied list will be exactly @n@ elements long. As
2124+
-- an optimization, this function allocates a buffer for @n@ elements, which
2125+
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
2126+
-- that parameter.
21232127
--
21242128
-- @
21252129
-- fromListN n xs = 'fromList' ('take' n xs)

vector/src/Data/Vector/Generic.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,10 +2298,10 @@ fromList :: Vector v a => [a] -> v a
22982298
fromList = unstream . Bundle.fromList
22992299

23002300
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
2301-
-- expected that supplied list will be exactly @n@ elements long. As
2302-
-- optimization this function allocates buffer for @n@ elements and
2303-
-- could be used to DoS by exhausting memory if attacker controls that
2304-
-- parameter.
2301+
-- expected that the supplied list will be exactly @n@ elements long. As
2302+
-- an optimization, this function allocates a buffer for @n@ elements, which
2303+
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
2304+
-- that parameter.
23052305
--
23062306
-- @
23072307
-- fromListN n xs = 'fromList' ('take' n xs)

vector/src/Data/Vector/Primitive.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,10 +1787,10 @@ fromList :: Prim a => [a] -> Vector a
17871787
fromList = G.fromList
17881788

17891789
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1790-
-- expected that supplied list will be exactly @n@ elements long. As
1791-
-- optimization this function allocates buffer for @n@ elements and
1792-
-- could be used to DoS by exhausting memory if attacker controls that
1793-
-- parameter.
1790+
-- expected that the supplied list will be exactly @n@ elements long. As
1791+
-- an optimization, this function allocates a buffer for @n@ elements, which
1792+
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
1793+
-- that parameter.
17941794
--
17951795
-- @
17961796
-- fromListN n xs = 'fromList' ('take' n xs)

vector/src/Data/Vector/Storable.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,10 +1833,10 @@ fromList :: Storable a => [a] -> Vector a
18331833
fromList = G.fromList
18341834

18351835
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1836-
-- expected that supplied list will be exactly @n@ elements long. As
1837-
-- optimization this function allocates buffer for @n@ elements and
1838-
-- could be used to DoS by exhausting memory if attacker controls that
1839-
-- parameter.
1836+
-- expected that the supplied list will be exactly @n@ elements long. As
1837+
-- an optimization, this function allocates a buffer for @n@ elements, which
1838+
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
1839+
-- that parameter.
18401840
--
18411841
-- @
18421842
-- fromListN n xs = 'fromList' ('take' n xs)

vector/src/Data/Vector/Unboxed.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,10 +1879,10 @@ fromList :: Unbox a => [a] -> Vector a
18791879
fromList = G.fromList
18801880

18811881
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1882-
-- expected that supplied list will be exactly @n@ elements long. As
1883-
-- optimization this function allocates buffer for @n@ elements and
1884-
-- could be used to DoS by exhausting memory if attacker controls that
1885-
-- parameter.
1882+
-- expected that the supplied list will be exactly @n@ elements long. As
1883+
-- an optimization, this function allocates a buffer for @n@ elements, which
1884+
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
1885+
-- that parameter.
18861886
--
18871887
-- @
18881888
-- fromListN n xs = 'fromList' ('take' n xs)

0 commit comments

Comments
 (0)