Skip to content

Commit d92f3ac

Browse files
committed
Merge pull request #2054 from j3parker/master
Minor fixes
2 parents 11610f9 + 82e5fe1 commit d92f3ac

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ iterate over all characters, which `str::chars` helps with), and
13081308
for those that do, many don't need actual characters, and can operate
13091309
on bytes. For algorithms that do really need to index by character,
13101310
there's the option to convert your string to a character vector (using
1311-
`str::to_chars`).
1311+
`str::chars`).
13121312

13131313
Like vectors, strings are always unique. You can wrap them in a shared
13141314
box to share them. Unlike vectors, there is no mutable variant of

src/etc/vim/syntax/rust.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ syn match rustFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
4646
"floating point number, without dot, with exponent
4747
syn match rustFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
4848

49-
syn match rustCharacter "'[^']*'"
50-
5149
syn case match
50+
51+
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
52+
5253
syn region rustComment start="/\*" end="\*/" contains=rustComment
5354
syn region rustComment start="//" skip="\\$" end="$" keepend
5455

0 commit comments

Comments
 (0)