Open
Conversation
bdab5c8 to
b42db34
Compare
Siro256
requested changes
Apr 9, 2026
Member
Siro256
left a comment
There was a problem hiding this comment.
やっぱり命名の方針をこのタイミングでメモしておきたい感があります。
- 全部
地震情報細分区域だと、コードなのかVec<コード>なのか分かりにくい(型を見れば分かるのはそうとして、書いていて体験が悪そう)ので、Vecならsを付けたい 地震情報細分区域って長いので、細分区域、都道府県等、震度観測点、津波予報区のほうがいい気がしてきた
Comment on lines
+168
to
+169
| area_to_pref: &'a HashMap<codes::地震情報細分区域, codes::地震情報都道府県等>, | ||
| areas: HashSet<codes::地震情報細分区域>, |
Member
There was a problem hiding this comment.
area_to_pref -> 細分区域_to_都道府県等
areas -> 細分区域
とかに変えますか?(変えるなら同様の命名が関数の引数にもある)
Comment on lines
+211
to
+214
| #[allow(non_snake_case)] area_code__pref_code: &HashMap< | ||
| codes::地震情報細分区域, | ||
| codes::地震情報都道府県等, | ||
| >, |
Member
There was a problem hiding this comment.
area_code__pref_code -> area_to_pref (細分区域_to_都道府県等)に変えてもよさそう
Comment on lines
12
to
14
| struct TsunamiAreaCodeBuffer { | ||
| area_code_to_internal_code: HashMap<u32, u16>, | ||
| } |
Member
There was a problem hiding this comment.
TsunamiAreaCodeBuffer -> 津波予報区CodeBuffer
area_code_to_internal_code -> 津波予報区_to_internal_code
とかどうですか?
| @@ -72,7 +72,7 @@ | |||
|
|
|||
| struct AreaLines { | |||
| @@ -30,9 +30,9 @@ enum Lon { | |||
|
|
|||
| #[derive(Debug)] | |||
| pub struct IntensityStationInternal { | |||
Member
There was a problem hiding this comment.
IntensityStationInternal -> 震度観測点Internal?
| HashMap<u32, usize>, | ||
| HashMap<codes::地震情報細分区域, codes::地震情報都道府県等>, | ||
| ) { | ||
| let stations: Vec<JsonEntry> = serde_json::from_str(s).unwrap(); |
| .collect(); | ||
|
|
||
| #[allow(non_snake_case)] | ||
| let area_code__intensity_station_range: HashMap<_, _> = intensity_station_internal |
| @@ -93,14 +93,14 @@ pub fn read( | |||
| #[allow(non_snake_case)] | |||
| let area_code__pref_code: HashMap<_, _> = intensity_station_internal | |||
| .collect(); | ||
|
|
||
| #[allow(non_snake_case)] | ||
| let station_code__index: HashMap<_, _> = intensity_station_internal |
Member
Author
|
地震情報であるというコンテキストがコード上でついて回ってる限りはそれで良さそう…? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








とりあえず最低限やってみた
Closes: #256