Compare commits
2 commits
de208a20d5
...
91085a9eec
| Author | SHA1 | Date | |
|---|---|---|---|
| 91085a9eec | |||
| d55684096f |
1 changed files with 6 additions and 6 deletions
12
src/error.rs
12
src/error.rs
|
|
@ -64,8 +64,8 @@ pub enum Error {
|
||||||
|
|
||||||
// a helper to generate all the `From<T> for Error` impls
|
// a helper to generate all the `From<T> for Error` impls
|
||||||
macro_rules! impl_error_from {
|
macro_rules! impl_error_from {
|
||||||
// $typ: the source type; $var: the enum‐variant name
|
// $typ: the source type
|
||||||
( $( $typ:path => $var:ident ),* $(,)? ) => {
|
( $( $typ:path ),* $(,)? ) => {
|
||||||
$(
|
$(
|
||||||
// // implement for values
|
// // implement for values
|
||||||
// impl From<$typ> for Error {
|
// impl From<$typ> for Error {
|
||||||
|
|
@ -85,10 +85,10 @@ macro_rules! impl_error_from {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_error_from! {
|
impl_error_from! {
|
||||||
sharry::Uri => Uri,
|
sharry::Uri,
|
||||||
sharry::AliasID => AliasID,
|
sharry::AliasID,
|
||||||
sharry::ShareID => ShareID,
|
sharry::ShareID,
|
||||||
sharry::FileID => FileID,
|
sharry::FileID,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::needless_pass_by_value)]
|
#[allow(clippy::needless_pass_by_value)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue