Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return errors from parsing inner items #608

Merged
merged 2 commits into from May 18, 2022
Merged

Conversation

djc
Copy link
Contributor

@djc djc commented May 16, 2022

Thanks to @doyshinda for pointing this out in #585.

Fixes #587.

@valkum
Copy link
Contributor

valkum commented May 17, 2022

The tests currently fail because in test_filtered_scanning HSCAN actually returns a (String, usize), the field and the value.

Changing

let iter = con.hscan_match("foo", "key_0_*").unwrap();

for x in iter {
        // type inference limitations
        let x: usize = x;
        unseen.remove(&x);
    }

to

let iter = con
        .hscan_match::<&str, &str, (String, usize)>("foo", "key_0_*")
        .unwrap();

    for (_, x) in iter {
        unseen.remove(&x);
    }```

fixes the test.

The test incorrectly assumed HSCAN returns a vec of usize, whereas HSCAN
returns the field value pairs.
@djc djc force-pushed the yield-nested-parse-errors branch from 8b83bdc to 921b42b Compare May 17, 2022 15:05
@djc djc requested a review from jaymell May 17, 2022 15:15
@djc
Copy link
Contributor Author

djc commented May 18, 2022

(CI is not running due to the recent branch rename, see #612.)

@jaymell jaymell merged commit a320058 into main May 18, 2022
@jaymell jaymell deleted the yield-nested-parse-errors branch May 18, 2022 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FromRedisValue for Vec silently ignores errors
3 participants