File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ use std::str::Chars;
77#[ cfg( test) ]
88mod tests;
99
10- /// Errors and warnings that can occur during string unescaping.
10+ /// Errors and warnings that can occur during string unescaping. They mostly
11+ /// relate to malformed escape sequences, but there are a few that are about
12+ /// other problems.
1113#[ derive( Debug , PartialEq , Eq ) ]
1214pub enum EscapeError {
1315 /// Expected 1 char, but 0 were found.
@@ -73,9 +75,11 @@ impl EscapeError {
7375 }
7476}
7577
76- /// Takes a contents of a literal (without quotes) and produces a
77- /// sequence of escaped characters or errors.
78- /// Values are returned through invoking of the provided callback.
78+ /// Takes a contents of a literal (without quotes) and produces a sequence of
79+ /// escaped characters or errors.
80+ ///
81+ /// Values are returned by invoking `callback`. For `Char` and `Byte` modes,
82+ /// the callback will be called exactly once.
7983pub fn unescape_literal < F > ( src : & str , mode : Mode , callback : & mut F )
8084where
8185 F : FnMut ( Range < usize > , Result < char , EscapeError > ) ,
You can’t perform that action at this time.
0 commit comments