refactor: fix all clippy warnings properly
- UserProfile struct groups display_name/bio/avatar/banner/also_known_as/profile_fields - User::from_persistence takes UserProfile (6 args, was 11) - PersistedReview struct for Review::from_persistence (1 arg, was 8) - WatchlistApInput struct for watchlist_to_ap_object (1 arg, was 8) - ActivityPubDeps struct for activitypub::wire (1 arg, was 11) - FederationRepos type alias for wire() return types - FeedSortBy: impl std::str::FromStr instead of inherent from_str - postgres users.rs: row_to_user takes &PgRow like sqlite - collapse nested ifs in multipart handlers - type alias for complex return types (image-converter, worker) - tui: allow large_enum_variant at crate level (pre-existing, unrelated)
This commit is contained in:
@@ -2,8 +2,8 @@ use chrono::NaiveDateTime;
|
||||
use domain::{
|
||||
errors::DomainError,
|
||||
models::{
|
||||
DiaryEntry, FeedEntry, Movie, MovieSummary, Review, ReviewSource, UserSummary,
|
||||
WatchlistEntry, WatchlistWithMovie,
|
||||
DiaryEntry, FeedEntry, Movie, MovieSummary, PersistedReview, Review, ReviewSource,
|
||||
UserSummary, WatchlistEntry, WatchlistWithMovie,
|
||||
},
|
||||
value_objects::{
|
||||
Comment, Email, ExternalMetadataId, MovieId, MovieTitle, PosterPath, Rating, ReleaseYear,
|
||||
@@ -109,9 +109,16 @@ impl ReviewRow {
|
||||
None => ReviewSource::Local,
|
||||
Some(url) => ReviewSource::Remote { actor_url: url },
|
||||
};
|
||||
Ok(Review::from_persistence(
|
||||
id, movie_id, user_id, rating, comment, watched_at, created_at, source,
|
||||
))
|
||||
Ok(Review::from_persistence(PersistedReview {
|
||||
id,
|
||||
movie_id,
|
||||
user_id,
|
||||
rating,
|
||||
comment,
|
||||
watched_at,
|
||||
created_at,
|
||||
source,
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user