Skip to content

Commit 49b9a34

Browse files
committed
syntax/doc: fix docs for try_case_fold_simple
Its whole purpose is to not panic and instead return an error, which matches the implementation. This fixes the docs to properly reflect that.
1 parent e6a0c55 commit 49b9a34

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

regex-syntax/src/hir/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -892,14 +892,11 @@ impl ClassUnicode {
892892
/// this class consists of the range `a-z`, then applying case folding will
893893
/// result in the class containing both the ranges `a-z` and `A-Z`.
894894
///
895-
/// # Panics
895+
/// # Error
896896
///
897-
/// This routine panics when the case mapping data necessary for this
898-
/// routine to complete is unavailable. This occurs when the `unicode-case`
899-
/// feature is not enabled.
900-
///
901-
/// Callers should prefer using `try_case_fold_simple` instead, which will
902-
/// return an error instead of panicking.
897+
/// This routine returns an error when the case mapping data necessary
898+
/// for this routine to complete is unavailable. This occurs when the
899+
/// `unicode-case` feature is not enabled.
903900
pub fn try_case_fold_simple(
904901
&mut self,
905902
) -> result::Result<(), CaseFoldError> {

0 commit comments

Comments
 (0)