Skip to content

Commit e68697b

Browse files
committed
tutorial: Remove the sentence about mutable fields.
1 parent 9aab7e5 commit e68697b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

doc/tutorial.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1089,10 +1089,8 @@ we might like to compute the distance between `on_the_stack` and
10891089
to define a function that takes two arguments of type point—that is,
10901090
it takes the points by value. But this will cause the points to be
10911091
copied when we call the function. For points, this is probably not so
1092-
bad, but often copies are expensive or, worse, if copied data are in mutable
1093-
slots, they can change the semantics of your program. So we’d like to
1094-
define a function that takes the points by pointer. We can use
1095-
borrowed pointers to do this:
1092+
bad, but often copies are expensive. So we’d like to define a function
1093+
that takes the points by pointer. We can use borrowed pointers to do this:
10961094
10971095
~~~
10981096
# struct Point { x: float, y: float }

0 commit comments

Comments
 (0)