We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f769d0a + ed60bba commit d22c24fCopy full SHA for d22c24f
glib/src/match_info.rs
@@ -328,15 +328,14 @@ impl<'input> MatchInfo<'input> {
328
}
329
330
#[doc(alias = "g_match_info_next")]
331
- pub fn next(&self) -> Result<(), crate::Error> {
+ pub fn next(&self) -> Result<bool, crate::Error> {
332
unsafe {
333
let mut error = std::ptr::null_mut();
334
let is_ok = ffi::g_match_info_next(self.to_glib_none().0, &mut error);
335
- debug_assert_eq!(is_ok == crate::ffi::GFALSE, !error.is_null());
336
- if error.is_null() {
337
- Ok(())
338
- } else {
+ if !error.is_null() {
339
Err(from_glib_full(error))
+ } else {
+ Ok(from_glib(is_ok))
340
341
342
0 commit comments