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

Add #[must_use] for warnings #609

Closed
durango opened this Issue Feb 3, 2017 · 6 comments

Comments

Projects
None yet
7 participants
@durango
Contributor

durango commented Feb 3, 2017

@sgrif: I should add a #[must_use] on queries to prevent that mistake. Anyone mind opening an issue?

@sgrif: Making query.filter(name.like(user.name)); warn

@alexcameron89

This comment has been minimized.

Contributor

alexcameron89 commented Jul 19, 2017

I think this is fixed and good to close.

@sgrif

This comment has been minimized.

Member

sgrif commented Jul 19, 2017

Yup. Thanks!

@sgrif sgrif closed this Jul 19, 2017

@TimNN

This comment has been minimized.

TimNN commented Aug 5, 2017

Is this really fixed? The one PR linking this issue only mentions select and filter and also states:

But we should probably also add this to/think about insert, update and delete before we close that issue.

(I also just spend some time trying to figure out why my update wasn't executing until I noticed I was missing an .execute when adding an diesel::debug_sql. I'm pretty sure there were no warnings).

@sgrif

This comment has been minimized.

Member

sgrif commented Aug 5, 2017

Looks like we need an annotation on UpdateStatement and friends. Feel free to open a PR

@killercup killercup reopened this Aug 5, 2017

@AndrewSpeed

This comment has been minimized.

Contributor

AndrewSpeed commented Oct 7, 2018

I'm happy to put a PR up for this, if no one else is working on it

@weiznich

This comment has been minimized.

Contributor

weiznich commented Oct 7, 2018

@AndrewSpeed Feel free to take it. If there is any problem just ask here or (preferable) in our gitter channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment