Skip to content

Commit 84b5a94

Browse files
authored
fix: examples (#46)
1 parent f11c3ff commit 84b5a94

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/actix_web_example/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use std::env;
1818
async fn callback(signature: Signature, bytes: web::Bytes) -> Result<HttpResponse, Error> {
1919
// Get channel secret and access token by environment variable
2020
let channel_secret: &str =
21-
&env::var("LINE_CHANNEL_SECRET").expect("Failed getting LINE_CHANNEL_SECRET");
21+
&env::var("LINE_CHANNEL_SECRET").expect("Failed to get LINE_CHANNEL_SECRET");
2222
let access_token: &str =
23-
&env::var("LINE_CHANNEL_ACCESS_TOKEN").expect("Failed getting LINE_CHANNEL_ACCESS_TOKEN");
23+
&env::var("LINE_CHANNEL_ACCESS_TOKEN").expect("Failed to get LINE_CHANNEL_ACCESS_TOKEN");
2424

2525
let line = LINE::new(access_token.to_string());
2626

examples/rocket_example/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ use std::env;
1717
async fn world(signature: Signature, body: String) -> (Status, &'static str) {
1818
// Get channel secret and access token by environment variable
1919
let channel_secret: &str =
20-
&env::var("LINE_CHANNEL_SECRET").expect("Failed getting LINE_CHANNEL_SECRET");
20+
&env::var("LINE_CHANNEL_SECRET").expect("Failed to get LINE_CHANNEL_SECRET");
2121
let access_token: &str =
22-
&env::var("LINE_CHANNEL_ACCESS_TOKEN").expect("Failed getting LINE_CHANNEL_ACCESS_TOKEN");
22+
&env::var("LINE_CHANNEL_ACCESS_TOKEN").expect("Failed to get LINE_CHANNEL_ACCESS_TOKEN");
2323

2424
let _line = LINE::new(access_token.to_string());
2525

0 commit comments

Comments
 (0)