Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chimei-ruiju.orgへの対応: repositoryにchimei-ruiju用の構造体を定義 #428

Merged

Conversation

YuukiToriyama
Copy link
Owner

変更点

@YuukiToriyama YuukiToriyama self-assigned this Sep 16, 2024
@@ -13,17 +13,17 @@ pub struct PrefectureMaster {
#[derive(Deserialize, Debug)]
pub struct CityMaster {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: fields `name`, `towns`, and `coordinate` are never read
  --> core/src/domain/chimei_ruiju/entity.rs:16:16
   |
14 | pub struct CityMaster {
   |            ---------- fields in this struct
15 |     /// 市区町村名
16 |     pub(crate) name: String,
   |                ^^^^
17 |     /// 町名リスト
18 |     pub(crate) towns: Vec,
   |                ^^^^^
19 |     /// 緯度経度
20 |     coordinate: Coordinate,
   |     ^^^^^^^^^^
   |
   = note: `CityMaster` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現時点で使用箇所がないのは問題ない

/// 町名リスト
towns: Vec<String>,
pub(crate) towns: Vec<String>,
/// 緯度経度
coordinate: Coordinate,
}

#[derive(Deserialize, Debug)]
pub struct TownMaster {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: fields `name`, `blocks`, and `coordinate` are never read
  --> core/src/domain/chimei_ruiju/entity.rs:26:16
   |
24 | pub struct TownMaster {
   |            ---------- fields in this struct
25 |     /// 町名
26 |     pub(crate) name: String,
   |                ^^^^
27 |     /// 街区リスト
28 |     blocks: Vec,
   |     ^^^^^^
29 |     /// 緯度経度
30 |     coordinate: Coordinate,
   |     ^^^^^^^^^^
   |
   = note: `TownMaster` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現時点で使用箇所がないのは問題ない

use crate::service::chimei_ruiju::ChimeiRuijuApiService;
use jisx0401::Prefecture;

pub struct CityMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: struct `CityMasterRepository` is never constructed
 --> core/src/repository/chimei_ruiju/city.rs:6:12
  |
6 | pub struct CityMasterRepository {
  |            ^^^^^^^^^^^^^^^^^^^^

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現時点で使用箇所がないのは問題ない

api_service: ChimeiRuijuApiService,
}

impl CityMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get` is never used
  --> core/src/repository/chimei_ruiju/city.rs:11:18
   |
10 | impl CityMasterRepository {
   | ------------------------- method in this implementation
11 |     pub async fn get(
   |                  ^^^

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現時点で使用箇所がないのは問題ない

}

#[cfg(feature = "blocking")]
impl CityMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get_blocking` is never used
  --> core/src/repository/chimei_ruiju/city.rs:58:12
   |
57 | impl CityMasterRepository {
   | ------------------------- method in this implementation
58 |     pub fn get_blocking(
   |            ^^^^^^^^^^^^

use crate::service::chimei_ruiju::ChimeiRuijuApiService;
use jisx0401::Prefecture;

pub struct PrefectureMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: struct `PrefectureMasterRepository` is never constructed
 --> core/src/repository/chimei_ruiju/prefecture.rs:6:12
  |
6 | pub struct PrefectureMasterRepository {
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^

api_service: ChimeiRuijuApiService,
}

impl PrefectureMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get` is never used
  --> core/src/repository/chimei_ruiju/prefecture.rs:11:18
   |
10 | impl PrefectureMasterRepository {
   | ------------------------------- method in this implementation
11 |     pub async fn get(&self, prefecture: &Prefecture) -> Result {
   |                  ^^^

}

#[cfg(feature = "blocking")]
impl PrefectureMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get_blocking` is never used
   --> core/src/repository/chimei_ruiju/prefecture.rs:138:12
    |
137 | impl PrefectureMasterRepository {
    | ------------------------------- method in this implementation
138 |     pub fn get_blocking(&self, prefecture: Prefecture) -> Result {
    |            ^^^^^^^^^^^^

api_service: ChimeiRuijuApiService,
}

impl TownMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get` is never used
  --> core/src/repository/chimei_ruiju/town.rs:12:18
   |
11 | impl TownMasterRepository {
   | ------------------------- method in this implementation
12 |     pub async fn get(
   |                  ^^^

}

#[cfg(feature = "blocking")]
impl TownMasterRepository {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: method `get_blocking` is never used
  --> core/src/repository/chimei_ruiju/town.rs:50:12
   |
49 | impl TownMasterRepository {
   | ------------------------- method in this implementation
50 |     pub fn get_blocking(
   |            ^^^^^^^^^^^^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: fields `name`, `cities`, and `coordinate` are never read
  --> core/src/domain/chimei_ruiju/entity.rs:6:16
   |
4  | pub struct PrefectureMaster {
   |            ---------------- fields in this struct
5  |     /// 都道府県名
6  |     pub(crate) name: String,
   |                ^^^^
7  |     /// 市区町村名リスト
8  |     pub(crate) cities: Vec,
   |                ^^^^^^
9  |     /// 代表点の緯度経度
10 |     pub(crate) coordinate: Coordinate,
   |                ^^^^^^^^^^
   |
   = note: `PrefectureMaster` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: fields `koaza`, `block_number`, `residential_address_indication`, and `coordinate` are never read
  --> core/src/domain/chimei_ruiju/entity.rs:36:5
   |
34 | pub struct Block {
   |            ----- fields in this struct
35 |     /// 小字・通称名
36 |     koaza: String,
   |     ^^^^^
37 |     /// 街区符号・地番
38 |     block_number: String,
   |     ^^^^^^^^^^^^
39 |     /// 住居表示の有無
40 |     residential_address_indication: bool,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41 |     /// 緯度経度
42 |     coordinate: Coordinate,
   |     ^^^^^^^^^^
   |
   = note: `Block` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [clippy] reported by reviewdog 🐶

warning: fields `latitude` and `longitude` are never read
  --> core/src/domain/chimei_ruiju/entity.rs:48:16
   |
46 | pub struct Coordinate {
   |            ---------- fields in this struct
47 |     /// 緯度
48 |     pub(crate) latitude: f64,
   |                ^^^^^^^^
49 |     /// 経度
50 |     pub(crate) longitude: f64,
   |                ^^^^^^^^^
   |
   = note: `Coordinate` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

@YuukiToriyama YuukiToriyama marked this pull request as ready for review September 16, 2024 11:14
@YuukiToriyama YuukiToriyama merged commit 20c3135 into feature/chimei-ruiju/master Sep 16, 2024
7 checks passed
@YuukiToriyama YuukiToriyama deleted the feature/chimei-ruiju/repository branch September 16, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant