diff options
| author | Max Audron <audron@cocaine.farm> | 2021-07-21 18:21:41 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-07-21 18:21:41 +0200 |
| commit | b68b3243550293c87c3996b9d2d44fad65a33ddc (patch) | |
| tree | 7cc9bbcaf0e918fdddf5d2cf26ed5f3b59897e84 | |
| parent | WIP: impl more signalproxy objects (diff) | |
minor docs and cleanup
Diffstat (limited to '')
| -rw-r--r-- | derive/src/from/mod.rs | 4 | ||||
| -rw-r--r-- | examples/quasselproxy/src/main.rs | 5 | ||||
| -rw-r--r-- | src/lib.rs | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/derive/src/from/mod.rs b/derive/src/from/mod.rs index 2855d1a..4b02f22 100644 --- a/derive/src/from/mod.rs +++ b/derive/src/from/mod.rs @@ -60,7 +60,7 @@ pub fn from(input: proc_macro::TokenStream) -> proc_macro::TokenStream { fn try_from(input: #enum_name) -> Result<Self, Self::Error> { match input { #enum_name::#variant(input) => Ok(input), - v => Err(format!("variant::from: {} wrong variant expected: {:?}", #inner_type_str, v)), + v => Err(format!("variant::from: wrong variant, expected: {}, got: {:?}", #inner_type_str, v)), } } } @@ -71,7 +71,7 @@ pub fn from(input: proc_macro::TokenStream) -> proc_macro::TokenStream { fn try_from(input: &#enum_name) -> Result<Self, Self::Error> { match input { #enum_name::#variant(input) => Ok(input.clone()), - v => Err(format!("variant::from: {} wrong variant expected: {:?}", #inner_type_str, v)), + v => Err(format!("variant::from: wrong variant, expected: {}, got: {:?}", #inner_type_str, v)), } } } diff --git a/examples/quasselproxy/src/main.rs b/examples/quasselproxy/src/main.rs index 227240a..eb6ab28 100644 --- a/examples/quasselproxy/src/main.rs +++ b/examples/quasselproxy/src/main.rs @@ -1,3 +1,8 @@ +/// quasselproxy +/// +/// A simple inspection proxy for the quassel protocol +/// +/// cargo run -- <core host>:<port> <user> <pass> use failure::Error; use std::result::Result; @@ -1,7 +1,6 @@ #![feature(test)] -#![feature(external_doc)] #![feature(doc_cfg)] -#![doc(include = "../README.md")] +#[doc = include_str!("../README.md")] #[cfg_attr(docsrs, feature(doc_cfg))] #[macro_use] mod util; |
