Skip to content

Commit

Permalink
Merge pull request #483 from YuukiToriyama/feature/fix-parsed-address…
Browse files Browse the repository at this point in the history
…/fix-docs-for-new-parser

ParsedAddressの修正: `Parser#parse`のドキュメントの修正
  • Loading branch information
YuukiToriyama authored Oct 28, 2024
2 parents 5e808a3 + 89b5bce commit a482e99
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/src/experimental/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ pub struct Parser {
}

impl Parser {
/// Parse address into token sequence.
/// Parse address into [ParsedAddress].
///
/// 住所をパースしトークン列に変換します
/// 住所をパースし、[ParsedAddress]を返します
///
/// # Example
/// ```
Expand All @@ -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 {
Expand Down

0 comments on commit a482e99

Please sign in to comment.