Skip to content

Commit

Permalink
update: #426: ChimeiRuijuInteractor#get_town_masterの引数を変更
Browse files Browse the repository at this point in the history
`prefecture_name: &str` -> `prefecture: &jisx0401::Prefecture`
  • Loading branch information
YuukiToriyama committed Oct 19, 2024
1 parent 47f3a95 commit ce1f0ed
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/interactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) trait ChimeiRuijuInteractor {
/// 町名マスタを取得
async fn get_town_master(
&self,
prefecture_name: &str,
prefecture: &Prefecture,
city_name: &str,
town_name: &str,
) -> Result<TownMaster, ApiError>;
Expand Down Expand Up @@ -59,11 +59,10 @@ impl ChimeiRuijuInteractor for ChimeiRuijuInteractorImpl {

async fn get_town_master(
&self,
prefecture_name: &str,
prefecture: &Prefecture,
city_name: &str,
town_name: &str,
) -> Result<TownMaster, ApiError> {
let prefecture = Prefecture::try_from(prefecture_name).unwrap();
TownMasterRepository::get(&self.api_service, &prefecture, city_name, town_name).await
TownMasterRepository::get(&self.api_service, prefecture, city_name, town_name).await
}
}

0 comments on commit ce1f0ed

Please sign in to comment.