error-chain icon indicating copy to clipboard operation
error-chain copied to clipboard

links { MyModuleError(my_module) }

Open nielsle opened this issue 8 years ago • 1 comments
trafficstars

If a module exports Error and ErrorKind, then it could be great to be able to write the following

error_chain! {
    links {  
        Mymodule(my_module);
    }
}

This should expand to the same as

error_chain! {
    links {  
        Mymodule(my_module::Error, my_module::ErrorKind);
    }
}

nielsle avatar Jul 11 '17 08:07 nielsle

The whole links stuff is not as convenient to use as it could be. I don't plan to add your change because of the added special cases, but you can try a PR!

Yamakaky avatar Jul 11 '17 17:07 Yamakaky