update to use fmt::{Display,Debug} instead of fmt::{String,Show}

This commit is contained in:
Patrick Fernie 2015-02-03 18:59:58 -05:00
parent 88d0566010
commit 58fa5bde2a
2 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ extern crate time;
use time::Timespec;
use rusqlite::SqliteConnection;
#[derive(Show)]
#[derive(Debug)]
struct Person {
id: i32,
name: String,

View File

@ -9,7 +9,7 @@
//! use time::Timespec;
//! use rusqlite::SqliteConnection;
//!
//! #[derive(Show)]
//! #[derive(Debug)]
//! struct Person {
//! id: i32,
//! name: String,
@ -88,7 +88,7 @@ unsafe fn errmsg_to_string(errmsg: *const c_char) -> String {
}
/// Encompasses an error result from a call to the SQLite C API.
#[derive(Show)]
#[derive(Debug)]
pub struct SqliteError {
/// The error code returned by a SQLite C API call. See [SQLite Result
/// Codes](http://www.sqlite.org/rescode.html) for details.
@ -99,7 +99,7 @@ pub struct SqliteError {
pub message: String,
}
impl fmt::String for SqliteError {
impl fmt::Display for SqliteError {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(f, "SqliteError( code: {}, message: {} )", self.code, self.message)
}
@ -323,7 +323,7 @@ impl SqliteConnection {
}
}
impl fmt::Show for SqliteConnection {
impl fmt::Debug for SqliteConnection {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "SqliteConnection()")
}
@ -547,7 +547,7 @@ impl<'conn> SqliteStatement<'conn> {
}
}
impl<'conn> fmt::Show for SqliteStatement<'conn> {
impl<'conn> fmt::Debug for SqliteStatement<'conn> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Statement( conn: {:?}, stmt: {:?} )", self.conn, self.stmt)
}