File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
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
+ /// relates 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.
@@ -76,6 +78,7 @@ impl EscapeError {
76
78
/// Takes a contents of a literal (without quotes) and produces a
77
79
/// sequence of escaped characters or errors.
78
80
/// Values are returned through invoking of the provided callback.
81
+ /// For `Char` and `Byte` modes, the callback will be called exactly once.
79
82
pub fn unescape_literal < F > ( src : & str , mode : Mode , callback : & mut F )
80
83
where
81
84
F : FnMut ( Range < usize > , Result < char , EscapeError > ) ,
You can’t perform that action at this time.
0 commit comments