unsafe fn run(&self, prefn: PrefilterFnTy) {
            let mut prestate = PrefilterState::new();
            assert_eq!(
                self.output,
                prefn(
                    &mut prestate,
                    &self.ninfo,
                    &self.haystack,
                    &self.needle
                ),
                "ninfo: {:?}, haystack(len={}): {:?}, needle(len={}): {:?}",
                self.ninfo,
                self.haystack.len(),
                std::str::from_utf8(&self.haystack).unwrap(),
                self.needle.len(),
                std::str::from_utf8(&self.needle).unwrap(),
            );
        }
/// Run this specific test on the given prefilter function. If the
/// outputs do no match, then this routine panics with a failure
/// message.
///
/// # Safety
///
/// Callers must ensure that the given prefilter function pointer is
/// safe to call for all inputs in the current environment.
Run this specific test on the given prefilter function. If the
outputs do no match, then this routine panics with a failure
message.
Run this specific test on the given prefilter function . If the outputs do no match then this routine panics with a failure message .
unsafe fn run(&self, prefn: PrefilterFnTy) {
            let mut prestate = PrefilterState::new();
            assert_eq!(
                self.output,
                prefn(
                    &mut prestate,
                    &self.ninfo,
                    &self.haystack,
                    &self.needle
                ),
                "ninfo: {:?}, haystack(len={}): {:?}, needle(len={}): {:?}",
                self.ninfo,
                self.haystack.len(),
                std::str::from_utf8(&self.haystack).unwrap(),
                self.needle.len(),
                std::str::from_utf8(&self.needle).unwrap(),
            );
        }
unsafe fn run ( & self , prefn : PrefilterFnTy ) { let mut prestate = PrefilterState :: new ( ) ; assert_eq ! ( self output prefn ( mut prestate self ninfo self haystack self needle ) " " self ninfo self haystack len ( ) std str from_utf8 ( self haystack ) unwrap ( ) self needle len ( ) std str from_utf8 ( self needle ) unwrap ( ) ) ; }
Run this specific test on the given prefilter function.
Run this specific test on the given prefilter function .
&self
prefn
PrefilterFnTy
&self
prefn
PrefilterFnTy
safety
Callers must ensure that the given prefilter function pointer is
safe to call for all inputs in the current environment.
Callers must ensure that the given prefilter function pointer is safe to call for all inputs in the current environment .