Skip to content

Commit

Permalink
Merge pull request #121 from YuukiToriyama/feature/unit-test-on-api-f…
Browse files Browse the repository at this point in the history
…ailed/update-readme

API失敗時のテストコード: READMEのサンプルコードを修正
  • Loading branch information
YuukiToriyama authored Jan 12, 2024
2 parents 6997063 + b499723 commit 3a05979
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ cargo add japanese-address-parser
### Async Api

```rust
use japanese_address_parser::api::client::ApiImpl;
use japanese_address_parser::api::{Api, ApiImpl};
use japanese_address_parser::parser::parse;

#[tokio::main]
async fn main() {
let async_api = ApiImpl {};
let async_api = ApiImpl::new();
let parse_result = parse(async_api, "東京都千代田区丸の内1-1-1").await;
println!("{:?}", parse_result);
}
Expand All @@ -32,11 +32,11 @@ async fn main() {
### Blocking Api

```rust
use japanese_address_parser::api::blocking::Client;
use japanese_address_parser::api::{BlockingApi, BlockingApiImpl};
use japanese_address_parser::parser::parse_blocking;

fn main() {
let blocking_api = Client {};
let blocking_api = BlockingApiImpl::new();
let parse_result = parse_blocking(blocking_api, "東京都千代田区丸の内1-1-1");
println!("{:?}", parse_result);
}
Expand Down

0 comments on commit 3a05979

Please sign in to comment.