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

Fix broken docs and examples when some rusqlite features are used #139

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

cljoly
Copy link
Owner

@cljoly cljoly commented Mar 18, 2024

WIP PR to fix the problem raised in #15 (comment):

Hi there, first of all thanks for your work!
I just stumbled across this line on the top level documentation of the crate:

conn.pragma_update(None, "journal_mode", &"WAL").unwrap();

This panics for me with ExecuteReturnedResults. According to this issue in rusqlite we have to use pragma_update_and_check instead.

So probably the easiest way to fix the documentation would be to change that line to:
conn.pragma_update_and_check(None, "journal_mode", &"WAL", |_| Ok(())).unwrap();

@cljoly cljoly added this to the Version 1.1.1 milestone Mar 18, 2024
@cljoly cljoly force-pushed the fix-docs branch 2 times, most recently from 850dbb9 to 98de962 Compare March 19, 2024 10:10
@coveralls
Copy link

coveralls commented Mar 19, 2024

Coverage Status

coverage: 95.796%. remained the same
when pulling e4d489c on fix-docs
into abc7991 on master.

As reported in [1], in the documentation and examples, the following:

```conn.pragma_update(None, "journal_mode", &"WAL").unwrap();```

panics with `ExecuteReturnedResults` when the “extra_check” feature of
rusqlite is enabled.

This wasn’t caught automatically because it turns out our examples
aren’t run in CI, because the Cargo manifests weren’t properly
referenced.

This includes the manifests properly and fixes the CI.

[1] #15 (comment)
@cljoly cljoly marked this pull request as ready for review March 19, 2024 11:11
@cljoly cljoly merged commit 7230da5 into master Mar 19, 2024
32 checks passed
@cljoly cljoly deleted the fix-docs branch March 19, 2024 11:13
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.

2 participants