Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Salikhov committed Jan 14, 2020
1 parent 64af434 commit 19a1ae0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ odbc-sys = "0.8.2"
odbc-safe = "0.5.0"
log = "0.4.1"
encoding_rs = "0.8.14"

doc-comment = "0.3.1"

[dev-dependencies]
chrono = "0.4"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern crate odbc;
extern crate env_logger;
use odbc::*;
use std::io;
use odbc_safe::AutocommitOn;

fn main() {

Expand All @@ -42,7 +43,7 @@ fn connect() -> std::result::Result<(), DiagnosticRecord> {
execute_statement(&conn)
}

fn execute_statement<'env>(conn: &Connection<'env>) -> Result<()> {
fn execute_statement<'env>(conn: &Connection<'env, AutocommitOn>) -> Result<()> {
let stmt = Statement::with_parent(conn)?;

let mut sql_text = String::new();
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ pub trait Handle {
/// Returns a valid handle to the odbc type.
unsafe fn handle(&self) -> *mut Self::To;
}

#[macro_use]
extern crate doc_comment;
doctest!("../README.md");

0 comments on commit 19a1ae0

Please sign in to comment.