Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schemer-rusqlite: update doc example; exposes error #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions schemer-rusqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
//! # Examples:
//!
//! ```rust
//! extern crate rusqlite;
//! #[macro_use]
//! extern crate schemer;
//! extern crate schemer_rusqlite;
//! extern crate uuid;
//!
//! use std::collections::HashSet;
//!
//! use rusqlite::{params, Connection, Transaction, Error as RusqliteError};
//! use schemer::{Migration, Migrator};
//! use schemer::{Migration, Migrator, migration};
//! use schemer_rusqlite::{RusqliteAdapter, RusqliteAdapterError, RusqliteMigration};
//! use uuid::Uuid;
//!
Expand All @@ -38,16 +32,14 @@
//! }
//! }
//!
//! fn main() {
//! let mut conn = Connection::open_in_memory().unwrap();
//! let adapter = RusqliteAdapter::new(&mut conn, None);
//! let mut conn = Connection::open_in_memory().unwrap();
//! let adapter = RusqliteAdapter::new(&mut conn, None);
//!
//! let mut migrator = Migrator::new(adapter);
//! let mut migrator = Migrator::new(adapter);
//!
//! let migration = Box::new(MyExampleMigration {});
//! migrator.register(migration);
//! migrator.up(None);
//! }
//! let migration = Box::new(MyExampleMigration {});
//! migrator.register(migration).unwrap();
//! migrator.up(None).unwrap();
//! ```
#![warn(clippy::all)]
#![forbid(unsafe_code)]
Expand Down
Loading