Skip to content

Commit

Permalink
Merge branch 'master' of github.com:blackbeam/rust-mysql-simple
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Dec 9, 2018
2 parents 1eccbf1 + 46eeb71 commit e5d943e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ rust-mysql-simple
=================
[![Build Status](https://travis-ci.org/blackbeam/rust-mysql-simple.png?branch=master)](https://travis-ci.org/blackbeam/rust-mysql-simple) [![Build status](https://ci.appveyor.com/api/projects/status/4te7c9q4tlmwvof0/branch/master?svg=true)](https://ci.appveyor.com/project/blackbeam/rust-mysql-simple/branch/master)

Mysql client library implemented in rust. Feel free to open a new issues and pull requests.
Mysql client library implemented in rust. Feel free to open new issues and pull requests.

### Changelog
Available [here](https://github.com/blackbeam/rust-mysql-simple/releases)

### Documentation
Latest crate API docs hosted on [docs.rs](https://docs.rs/crate/mysql).
Latest crate API docs are hosted on [docs.rs](https://docs.rs/crate/mysql).

### Installation
Please use [crates.io](https://crates.io/crates/mysql)
Expand All @@ -20,7 +20,7 @@ mysql = "*"

### SSL Support

rust-mysql-simple offers support of SSL via `ssl` cargo feature which is disabled by default.
rust-mysql-simple offers support for SSL via `ssl` cargo feature which is disabled by default.
Add `ssl` feature to enable:

```toml
Expand All @@ -41,4 +41,4 @@ features = ["rustc-serialize"]
```

### Windows support (since 0.18.0)
Windows is supported but currently rust-mysql-simple has no support of SSL on Windows.
Windows is supported but currently rust-mysql-simple has no support for SSL on Windows.
14 changes: 14 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use std::sync;
use myc::named_params::MixedParamsError;
use myc::packets::ErrPacket;
use myc::params::MissingNamedParameterError;
use myc::row::convert::FromRowError;
use myc::value::convert::FromValueError;

#[cfg(all(feature = "ssl", all(unix, not(target_os = "macos"))))]
use openssl::{
Expand Down Expand Up @@ -108,6 +110,18 @@ impl error::Error for Error {
}
}

impl From<FromValueError> for Error {
fn from(FromValueError(value): FromValueError) -> Error {
Error::FromValueError(value)
}
}

impl From<FromRowError> for Error {
fn from(FromRowError(row): FromRowError) -> Error {
Error::FromRowError(row)
}
}

impl From<MissingNamedParameterError> for Error {
fn from(MissingNamedParameterError(name): MissingNamedParameterError) -> Error {
Error::DriverError(DriverError::MissingNamedParameter(name))
Expand Down

0 comments on commit e5d943e

Please sign in to comment.