Skip to content

Commit

Permalink
make doctests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
andrusha committed Aug 16, 2023
1 parent e1f3312 commit cc04ff8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jwt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ snowflake-jwt = "0.1.0"
Check [examples](./examples) for working programs using the library.

```rust
use anyhow;
use fs;
use anyhow::Result;
use std::fs;
use snowflake_jwt;

fn get_token(private_key_path: &str, account_identifier: &str, username: &str) -> Result<String> {
Expand Down
7 changes: 4 additions & 3 deletions snowflake-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use anyhow::Result;
use snowflake_api::{QueryResult, SnowflakeApi};

async fn run_query(sql: &str) -> Result<QueryResult> {
let api = SnowflakeApi::with_password_auth(
let mut api = SnowflakeApi::with_password_auth(
"ACCOUNT_IDENTIFIER",
"WAREHOUSE",
Some("DATABASE"),
Expand All @@ -51,8 +51,9 @@ async fn run_query(sql: &str) -> Result<QueryResult> {
Some("ROLE"),
"PASSWORD",
)?;

api.exec(sql).await.into()
let res = api.exec(sql).await?;

Ok(res)
}
```

Expand Down

0 comments on commit cc04ff8

Please sign in to comment.