refactor code to use Shrinkwraprs and diesel-derive-newtype (#598)

* add shrinkwraprs and implement Id thru it

This also means we can automatically convert Id to String without using
.into()!

* cleanup with the help of clippy!

* cleanup with the help of cargo fmt!

* remove extra block

* Shrinkwrap Page, ContentLen and RemoteForm

* translations
This commit is contained in:
Igor Galić
2019-05-25 20:23:45 +02:00
committed by Baptiste Gelez
parent 59023e9602
commit 8c59c822b6
38 changed files with 10956 additions and 10875 deletions
+1 -2
View File
@@ -193,8 +193,7 @@ pub fn follow_not_connected(
) -> Result<Result<Flash<Ructe>, Redirect>, ErrorPage> {
let target = User::find_by_fqn(&rockets, &name)?;
if let Some(remote_form) = remote_form {
let remote = &remote_form.remote;
if let Some(uri) = User::fetch_remote_interact_uri(remote)
if let Some(uri) = User::fetch_remote_interact_uri(&remote_form)
.ok()
.and_then(|uri| {
rt_format!(