Skip to content

Commit b508e2a

Browse files
committed
Fixed #4262: incorrect docs for Slice#copy_from and similar
1 parent 755f73a commit b508e2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/slice.cr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ struct Slice(T)
248248

249249
# Copies the contents of this slice into *target*.
250250
#
251-
# Raises if the desination slice cannot fit the data being transferred
251+
# Raises `IndexError` if the desination slice cannot fit the data being transferred
252252
# e.g. dest.size < self.size.
253253
#
254254
# ```
@@ -266,7 +266,7 @@ struct Slice(T)
266266

267267
# Copies the contents of *source* into this slice.
268268
#
269-
# Truncates if the other slice doesn't fit. The same as `source.copy_to(self)`.
269+
# Raises `IndexError` if the desination slice cannot fit the data being transferred.
270270
@[AlwaysInline]
271271
def copy_from(source : self)
272272
source.copy_to(self)
@@ -285,7 +285,7 @@ struct Slice(T)
285285
# Moves the contents of this slice into *target*. *target* and `self` may
286286
# overlap; the copy is always done in a non-destructive manner.
287287
#
288-
# Raises if the desination slice cannot fit the data being transferred
288+
# Raises `IndexError` if the desination slice cannot fit the data being transferred
289289
# e.g. `dest.size < self.size`.
290290
#
291291
# ```
@@ -306,7 +306,7 @@ struct Slice(T)
306306
# Moves the contents of *source* into this slice. *source* and `self` may
307307
# overlap; the copy is always done in a non-destructive manner.
308308
#
309-
# Truncates if the other slice doesn't fit. The same as `source.move_to(self)`.
309+
# Raises `IndexError` if the desination slice cannot fit the data being transferred.
310310
@[AlwaysInline]
311311
def move_from(source : self)
312312
source.move_to(self)

0 commit comments

Comments
 (0)