Skip to content

Commit 1c2aa52

Browse files
committed
Change wording from "malicious" to "incorrect"
1 parent 3fccd37 commit 1c2aa52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

regex-automata/src/util/search.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<'h> Input<'h> {
110110
/// Create a new search configuration for the given haystack.
111111
#[inline]
112112
pub fn new<H: ?Sized + AsRef<[u8]>>(haystack: &'h H) -> Input<'h> {
113-
// Perform only one call to `haystack.as_ref()` to protect from malicious
113+
// Perform only one call to `haystack.as_ref()` to protect from incorrect
114114
// implementations that return different values from multiple calls.
115115
// This is important because there's code that relies on `span` not being
116116
// out of bounds with respect to the stored `haystack`.
@@ -1973,7 +1973,7 @@ mod tests {
19731973
}
19741974

19751975
#[test]
1976-
fn malicious_asref_guard() {
1976+
fn incorrect_asref_guard() {
19771977
struct Bad(std::cell::Cell<bool>);
19781978

19791979
impl AsRef<[u8]> for Bad {

0 commit comments

Comments
 (0)