Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update
A little background on the unsolicited update: I wanted to try rocket for a very low stakes project at work, and needed some very basic authentication and wanted to use SQLite to store data. This go me to some issues with package versions with rocket_auth and the rest of the rocket ecosystem/sqlx. I fixed them (it was shorter than doing the auth myself) and thought I would push my updates here. If this is unwelcome in any way please go ahead and simply reject it.
Overview
This PR includes a lot of updates. They fall into three categories. Overall, the main goal was to bring the package up to sync with the new version of
rocket
(0.5.1 when I started this, at least) and a newer version ofrocket_db_pools
(this version created an issue with versions oflibsqlite-sys
). This lead to a few changes:#[throws(error)]
declarations to have explicitResult<>
return types in some placesPackage updates
I pushed everything to use the latest version. Every package. This broke some things (validator no longer includes
validate_email()
(as an exported function at least) so I wrote a custom on, and added a test for it. It's a simple regex trick but is worked for my purpose; I have only two test cases for it so far.Also, bumping to a later version of rocket was an issue. the
rocket::Outcome
enum is changed;Outcome::Failure
has becomeOutcome::Error
, which I updated throughout.I mostly had to change the auth.rs, user.rs, and user_impl.rs files, so I went through and updated those functions to have an explicit return type for them. There are some more
#[throws(error)
macros around the other files that will have to be dealt with at some point.I also updated the validator derive macro for Signup to use the new custom validator syntax (again, a breaking change there).
None of the udpate