MCPcopy Index your code
hub / github.com/RustPython/RustPython / at_non_boundary

Method at_non_boundary

crates/sre_engine/src/engine.rs:1144–1155  ·  view source on GitHub ↗
(
        &self,
        req: &Request<'_, S>,
        mut word_checker: F,
    )

Source from the content-addressed store, hash-verified

1142 }
1143
1144 fn at_non_boundary<S: StrDrive, F: FnMut(u32) -> bool>(
1145 &self,
1146 req: &Request<'_, S>,
1147 mut word_checker: F,
1148 ) -> bool {
1149 if self.at_beginning() && self.at_end(req) {
1150 return false;
1151 }
1152 let that = !self.at_beginning() && word_checker(self.back_peek_char::<S>());
1153 let this = !self.at_end(req) && word_checker(self.peek_char::<S>());
1154 this == that
1155 }
1156
1157 const fn can_success<S>(&self, req: &Request<'_, S>) -> bool {
1158 if !self.toplevel {

Callers 1

atFunction · 0.80

Calls 2

at_beginningMethod · 0.80
at_endMethod · 0.45

Tested by

no test coverage detected