(
&self,
affix: &'a PyObject,
func_name: &str,
py_type_name: &str,
func: F,
vm: &VirtualMachine,
)
| 199 | |
| 200 | #[inline] |
| 201 | fn py_starts_ends_with<'a, T, F>( |
| 202 | &self, |
| 203 | affix: &'a PyObject, |
| 204 | func_name: &str, |
| 205 | py_type_name: &str, |
| 206 | func: F, |
| 207 | vm: &VirtualMachine, |
| 208 | ) -> PyResult<bool> |
| 209 | where |
| 210 | T: TryFromBorrowedObject<'a>, |
| 211 | F: Fn(&Self, T) -> bool, |
| 212 | { |
| 213 | single_or_tuple_any( |
| 214 | affix, |
| 215 | &|s: T| Ok(func(self, s)), |
| 216 | &|o| { |
| 217 | format!( |
| 218 | "{} first arg must be {} or a tuple of {}, not {}", |
| 219 | func_name, |
| 220 | py_type_name, |
| 221 | py_type_name, |
| 222 | o.class(), |
| 223 | ) |
| 224 | }, |
| 225 | vm, |
| 226 | ) |
| 227 | } |
| 228 | |
| 229 | #[inline] |
| 230 | fn py_strip<'a, S, FC, FD>( |
no test coverage detected