aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSascha Grunert <mail@saschagrunert.de>2017-02-22 15:15:08 +0100
committerSascha Grunert <mail@saschagrunert.de>2017-02-22 15:15:08 +0100
commit8abc917d29a078555759508702d77b4d5f5a6b23 (patch)
tree2f4e3d58be1618a3653a6c74ddfac53635ac59c6 /src
parentImproved API and unit test (diff)
downloadwireguard-rs-8abc917d29a078555759508702d77b4d5f5a6b23.tar.xz
wireguard-rs-8abc917d29a078555759508702d77b4d5f5a6b23.zip
Improved unit testing
Diffstat (limited to 'src')
-rw-r--r--src/error.rs5
-rw-r--r--src/lib.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs
index 0314dfb..220ed27 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -10,10 +10,11 @@ pub type WgResult<T> = Result<T, WgError>;
/// The global Error type for wiki
pub struct WgError {
/// A further description for the error
- pub description: String,
+ description: String,
+ #[allow(dead_code)]
/// The cause for this error
- pub cause: Option<Box<Error>>,
+ cause: Option<Box<Error>>,
}
/// Representation of an error case
diff --git a/src/lib.rs b/src/lib.rs
index 0baac2b..1865ca1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -13,12 +13,12 @@ extern crate futures;
extern crate mowl;
#[macro_use]
-pub mod error;
+mod error;
mod device;
mod bindgen;
pub use device::Device;
-use error::WgResult;
+pub use error::{WgResult, WgError};
use std::io;
use std::net::SocketAddr;