File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,10 @@ function to find the longer of two string slices</span>
113113
114114Note that we want the function to take string slices, which are references,
115115because we don’t want the ` longest ` function to take ownership of its
116- parameters. We want to allow the function to accept slices of a ` String ` (the
117- type stored in the variable ` string1 ` ) as well as string literals (which is
118- what variable ` string2 ` contains).
119-
120- Refer to the [ “String Slices as Parameters”] [ string-slices-as-parameters ] <!--
121- ignore --> section in Chapter 4 for more discussion about why the parameters we
122- use in Listing 10-20 are the ones we want.
116+ parameters. Refer to the [ “String Slices as
117+ Parameters”] [ string-slices-as-parameters ] <!-- ignore --> section in Chapter 4
118+ for more discussion about why the parameters we use in Listing 10-20 are the
119+ ones we want.
123120
124121If we try to implement the ` longest ` function as shown in Listing 10-21, it
125122won’t compile.
You can’t perform that action at this time.
0 commit comments