Clippy lints

This commit is contained in:
Wojciech Kozlowski 2024-10-06 12:47:14 +02:00
parent f7e215eedf
commit 246f35e715
2 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ impl GetInfoMeta for AlbumMeta {
trait GetInfo { trait GetInfo {
type InfoType; type InfoType;
fn into_info(&self, info: Self::InfoType) -> InfoOption<Self::InfoType>; fn get_info(&self, info: Self::InfoType) -> InfoOption<Self::InfoType>;
} }
enum InfoOption<T> { enum InfoOption<T> {
@ -35,7 +35,7 @@ enum InfoOption<T> {
impl GetInfo for MatchOption<ArtistMeta> { impl GetInfo for MatchOption<ArtistMeta> {
type InfoType = ArtistInfo; type InfoType = ArtistInfo;
fn into_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> { fn get_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
match self { match self {
MatchOption::Some(option) => info.musicbrainz = option.entity.info.musicbrainz.clone(), MatchOption::Some(option) => info.musicbrainz = option.entity.info.musicbrainz.clone(),
MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid, MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid,
@ -48,7 +48,7 @@ impl GetInfo for MatchOption<ArtistMeta> {
impl GetInfo for MatchOption<AlbumMeta> { impl GetInfo for MatchOption<AlbumMeta> {
type InfoType = AlbumInfo; type InfoType = AlbumInfo;
fn into_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> { fn get_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
match self { match self {
MatchOption::Some(option) => info = option.entity.info.clone(), MatchOption::Some(option) => info = option.entity.info.clone(),
MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid, MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid,
@ -71,7 +71,7 @@ where
type InfoType = T::InfoType; type InfoType = T::InfoType;
fn extract_info(&self, index: usize, info: Self::InfoType) -> InfoOption<Self::InfoType> { fn extract_info(&self, index: usize, info: Self::InfoType) -> InfoOption<Self::InfoType> {
self.get(index).unwrap().into_info(info) self.get(index).unwrap().get_info(info)
} }
} }

View File

@ -231,7 +231,7 @@ impl JobInstance {
if let Some(params) = self.requests.front() { if let Some(params) = self.requests.front() {
let result_sender = &mut self.result_sender; let result_sender = &mut self.result_sender;
let paging = &mut self.paging; let paging = &mut self.paging;
Self::execute(musicbrainz, result_sender, event_sender, &params, paging)?; Self::execute(musicbrainz, result_sender, event_sender, params, paging)?;
}; };
if self.paging.is_none() { if self.paging.is_none() {