File tree 1 file changed +8
-4
lines changed
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;
7
7
#[ cfg( test) ]
8
8
mod tests;
9
9
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.
11
13
#[ derive( Debug , PartialEq , Eq ) ]
12
14
pub enum EscapeError {
13
15
/// Expected 1 char, but 0 were found.
@@ -73,9 +75,11 @@ impl EscapeError {
73
75
}
74
76
}
75
77
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.
79
83
pub fn unescape_literal < F > ( src : & str , mode : Mode , callback : & mut F )
80
84
where
81
85
F : FnMut ( Range < usize > , Result < char , EscapeError > ) ,
You can’t perform that action at this time.
0 commit comments