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;
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+ /// relates 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.
@@ -76,6 +78,7 @@ impl EscapeError {
7678/// Takes a contents of a literal (without quotes) and produces a
7779/// sequence of escaped characters or errors.
7880/// Values are returned through invoking of the provided callback.
81+ /// For `Char` and `Byte` modes, the callback will be called exactly once.
7982pub fn unescape_literal < F > ( src : & str , mode : Mode , callback : & mut F )
8083where
8184 F : FnMut ( Range < usize > , Result < char , EscapeError > ) ,
You can’t perform that action at this time.
0 commit comments