Comments (9)
How do you figure that'd work for examples using main
e.g. second example of the readme?
from diesel.
I think that .unwrap()
is a great thing for docs/examples. You don't have to teach your users how to handle error cases - there's a chapter in the Book for it.
from diesel.
The example using main
is probably fine. I think many of our examples could change to use try!
, or change their assertion to compare against Ok
though
from diesel.
I don't think we need to teach users how to handle error cases, but if we can avoid unwrap
without actually making the example less clear, I'd like to.
from diesel.
If this repo is going to be a popular place for people who newer to Rust (which I think it will be) it is important to show how to do it the right way. Or don't show it at all.
Perhaps saving the Result as a variable and then a comment underneath about dealing with the result?
from diesel.
Shouldn't this be closed because of the above PR? If not, I'm more than willing to finish what work wasn't covered by #45!
from diesel.
I think that there are still a few places left but I can't confirm at the moment. Feel free to let me know if that's the case
from diesel.
Ah, I see what you're talking about.
Upon doing a global project search for /// assert_eq!(
, I've found that cases that use .unwrap()
in the assert are all using Ok([statement])
now. Is this the desired beahvior?
Anyways, I'm recommending closing this issue and my Issue #34 PR if everything is as it should be. Sorry for the misunderstanding!
from diesel.
Thanks!
On Thu, May 12, 2016 at 7:31 AM Taylor Jones [email protected]
wrote:
Ah, I see what you're talking about.
Upon doing a global project search for /// assert_eq!(, I've found that
cases that use .unwrap() in the assert are all using Ok([statement]) now.
Is this the desired beahvior?Anyways, I'm closing this PR and recommending that #34
#34 be closed if everything
is as it should be. Sorry for the misunderstanding!—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#34 (comment)
from diesel.
Related Issues (20)
- SSL_MODE option not behaving correctly with Mysql 5.7 HOT 3
- Derive Queryable deserialize_as attribute doesn't support tuples HOT 4
- msvc+rust1.75 compile error HOT 4
- `Using unsupported buffer type: 253 (parameter: 1)` when trying to use the CLI HOT 14
- double free or corruption issue when establishing connection HOT 18
- Unable to group by date HOT 1
- Regression: LIKE queries on nullable fields in MySQL HOT 5
- Windows CI is failing to install postgres HOT 2
- Can not use .eq(Decimal_field + xxx) HOT 4
- Closing a sqlite connection does not clear the -wal and -shm file HOT 4
- Execute single-statement migrations without batch_execute HOT 6
- Linking error for diesel_cli in Alpine despite libraries being installed HOT 5
- Option field check in diesel_derives in incomplete
- oid caching leads to broken queries after schema changes HOT 1
- The diesel 2.1.5 version cannot close the tls connection HOT 7
- Diesel-Schema not supporting Postgres-SCHEMA HOT 1
- `skip_insertion` results in a compiler error HOT 3
- table with more than one primary_key can not use on_conflict().do_update() HOT 1
- Make empty changeset updates using `.optional()` , either ignore or bypass errors `QueryBuilderError` s.
- Rust-analyzer fails to autocomplete Match with diesel errors (Enum) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diesel.