-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
https://doc.rust-lang.org/stable/rust-by-example/conversion/try_from_try_into.html
Do not implement a function like this:
rust-axum-jwt-auth/src/handler.rs
Lines 194 to 205 in 040ae80
| fn filter_user_record(user: &User) -> FilteredUser { | |
| FilteredUser { | |
| id: user.id.to_string(), | |
| email: user.email.to_owned(), | |
| name: user.name.to_owned(), | |
| photo: user.photo.to_owned(), | |
| role: user.role.to_owned(), | |
| verified: user.verified, | |
| createdAt: user.created_at.unwrap(), | |
| updatedAt: user.updated_at.unwrap(), | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels