From 383fe8722f06203679f8022fa114f206ee4ea372 Mon Sep 17 00:00:00 2001 From: Yuuki Toriyama Date: Mon, 28 Oct 2024 23:41:52 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20ParsedAddress=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3:=20`Parser#parse`=E3=81=AE=E8=AA=AC=E6=98=8E=E3=81=8C?= =?UTF-8?q?=E9=81=A9=E5=88=87=E3=81=A7=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/experimental/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/experimental/parser.rs b/core/src/experimental/parser.rs index f6e02bb..95935c8 100644 --- a/core/src/experimental/parser.rs +++ b/core/src/experimental/parser.rs @@ -70,9 +70,9 @@ pub struct Parser { } impl Parser { - /// Parse address into token sequence. + /// Parse address into [ParsedAddress]. /// - /// 住所をパースしトークン列に変換します。 + /// 住所をパースし、[ParsedAddress]を返します。 /// /// # Example /// ``` From 89b5bce0480a0be0dfe96587c035f9012153c12c Mon Sep 17 00:00:00 2001 From: Yuuki Toriyama Date: Mon, 28 Oct 2024 23:42:19 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20ParsedAddress=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3:=20`Parser#parse`=E3=81=AE=E3=82=B5=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AB=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/experimental/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/experimental/parser.rs b/core/src/experimental/parser.rs index 95935c8..e634c99 100644 --- a/core/src/experimental/parser.rs +++ b/core/src/experimental/parser.rs @@ -81,7 +81,11 @@ impl Parser { /// async fn example() { /// let parser = Parser::default(); /// let result = parser.parse("埼玉県所沢市上山口2135").await; - /// println!("{:?}", result); + /// assert_eq!(result.prefecture, "埼玉県"); + /// assert_eq!(result.city, "所沢市"); + /// assert_eq!(result.town, "上山口"); + /// assert_eq!(result.rest, "2135"); + /// assert_eq!(result.metadata.depth, 3); /// } /// ``` pub async fn parse(&self, address: &str) -> ParsedAddress {