Skip to content

Commit

Permalink
Fixed #4262: incorrect docs for Slice#copy_from and similar
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jun 5, 2017
1 parent 755f73a commit b508e2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/slice.cr
Expand Up @@ -248,7 +248,7 @@ struct Slice(T)

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

# Copies the contents of *source* into this slice.
#
# Truncates if the other slice doesn't fit. The same as `source.copy_to(self)`.
# Raises `IndexError` if the desination slice cannot fit the data being transferred.
@[AlwaysInline]
def copy_from(source : self)
source.copy_to(self)
Expand All @@ -285,7 +285,7 @@ struct Slice(T)
# Moves the contents of this slice into *target*. *target* and `self` may
# overlap; the copy is always done in a non-destructive manner.
#
# Raises if the desination slice cannot fit the data being transferred
# Raises `IndexError` if the desination slice cannot fit the data being transferred
# e.g. `dest.size < self.size`.
#
# ```
Expand All @@ -306,7 +306,7 @@ struct Slice(T)
# Moves the contents of *source* into this slice. *source* and `self` may
# overlap; the copy is always done in a non-destructive manner.
#
# Truncates if the other slice doesn't fit. The same as `source.move_to(self)`.
# Raises `IndexError` if the desination slice cannot fit the data being transferred.
@[AlwaysInline]
def move_from(source : self)
source.move_to(self)
Expand Down

0 comments on commit b508e2a

Please sign in to comment.