Skip to content

Commit 7e4b368

Browse files
committed
ReportBody -> Body
1 parent d411036 commit 7e4b368

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resolver = "3"
88

99
[workspace.package]
1010
authors = ["Taku Fukada <[email protected]>", "MIERUNE Inc. <[email protected]>"]
11-
version = "0.3.1"
11+
version = "0.3.2"
1212
edition = "2024"
1313
repository = "https://github.com/MIERUNE/jmaxml"
1414
license = "MIT OR Apache-2.0"

jmaxml-json-types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8064,7 +8064,7 @@ export type Report = {
80648064
/** ヘッダ部 */
80658065
head: IbHead;
80668066
/** ボディー部 */
8067-
body: ReportBody;
8067+
body: Body;
80688068
};
80698069

8070-
export type ReportBody = ({ type: "meteorology" } & MeteBody) | ({ type: "seismology" } & SeisBody) | ({ type: "volcanology" } & VolcBody);
8070+
export type Body = ({ type: "meteorology" } & MeteBody) | ({ type: "seismology" } & SeisBody) | ({ type: "volcanology" } & VolcBody);

jmaxml-rs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub mod model;
22
mod parser;
33

4-
pub use model::{Control, IbHead, Report, ReportBody};
4+
pub use model::{Body, Control, IbHead, Report};
55

66
pub type Result<T> = std::result::Result<T, quick_xml::de::DeError>;

jmaxml-rs/src/model/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ pub struct Report {
1818
/// ヘッダー部
1919
pub head: IbHead,
2020
/// ボディー部
21-
pub body: ReportBody,
21+
pub body: Body,
2222
}
2323

2424
#[derive(Debug, Clone, Serialize, Deserialize)]
2525
#[serde(tag = "type", rename_all = "camelCase")]
26-
pub enum ReportBody {
26+
pub enum Body {
2727
/// 気象関連のボディー部
2828
Meteorology(Box<MeteBody>),
2929
/// 地震関連のボディー部

jmaxml-rs/src/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use quick_xml::{
66

77
use crate::{
88
Result,
9-
model::{MeteBody, Report, ReportBody, ReportInternal, SeisBody, VolcBody},
9+
model::{Body, MeteBody, Report, ReportInternal, SeisBody, VolcBody},
1010
};
1111

1212
// Telemetry showed chunks never exceeded 1KB
@@ -47,23 +47,23 @@ fn parse_by_namespace(namespace: &[u8], content: &str) -> Result<Report> {
4747
Ok(Report {
4848
control: report.control,
4949
head: report.head,
50-
body: ReportBody::Meteorology(report.body.into()),
50+
body: Body::Meteorology(report.body.into()),
5151
})
5252
}
5353
NS_SEIS => {
5454
let report: ReportInternal<SeisBody> = quick_xml::de::from_str(content)?;
5555
Ok(Report {
5656
control: report.control,
5757
head: report.head,
58-
body: ReportBody::Seismology(report.body.into()),
58+
body: Body::Seismology(report.body.into()),
5959
})
6060
}
6161
NS_VOLC => {
6262
let report: ReportInternal<VolcBody> = quick_xml::de::from_str(content)?;
6363
Ok(Report {
6464
control: report.control,
6565
head: report.head,
66-
body: ReportBody::Volcanology(report.body.into()),
66+
body: Body::Volcanology(report.body.into()),
6767
})
6868
}
6969
_ => Err(quick_xml::de::DeError::Custom(ERROR_MSG.into())),

jmx_codegen/languages/typescript_json.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
/** ヘッダ部 */
4848
head: IbHead;
4949
/** ボディー部 */
50-
body: ReportBody;
50+
body: Body;
5151
};
5252
53-
export type ReportBody = ({ type: "meteorology" } & MeteBody) | ({ type: "seismology" } & SeisBody) | ({ type: "volcanology" } & VolcBody);
53+
export type Body = ({ type: "meteorology" } & MeteBody) | ({ type: "seismology" } & SeisBody) | ({ type: "volcanology" } & VolcBody);
5454
"""
5555

5656

0 commit comments

Comments
 (0)