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:
committed by
Baptiste Gelez
parent
59023e9602
commit
8c59c822b6
@@ -642,7 +642,7 @@ impl FromId<PlumeRocket> for Post {
|
||||
.attributed_to_link_vec::<Id>()?
|
||||
.into_iter()
|
||||
.fold((None, vec![]), |(blog, mut authors), link| {
|
||||
let url: String = link.into();
|
||||
let url = link;
|
||||
match User::from_id(&c, &url, None) {
|
||||
Ok(u) => {
|
||||
authors.push(u);
|
||||
|
||||
Reference in New Issue
Block a user