Follow up from #456: Update path qualifier and introduce module-specific Result#488
Follow up from #456: Update path qualifier and introduce module-specific Result#488DanGould merged 2 commits intopayjoin:masterfrom
Result#488Conversation
This makes more sense since it's not the top-level error in the modules that were importing it
Pull Request Test Coverage Report for Build 12802427071Details
💛 - Coveralls |
36ab06d to
69e8263
Compare
DanGould
left a comment
There was a problem hiding this comment.
This is what I requested and a quick turnaround
I had to change db::Result = Result<Vec, Error> to Result = anyhow::Result<T, Error> since pub async fn new(timeout: Duration, db_host: String) -> RedisResult didn't return a Vec
I don't see the change to anyhow::Result, am I missing something? Can you point it out to me?
@nothingmuch can you take a look at the second commit here. Although it is what I asked for I'm not sure that my request was appropriate. Maybe I'm just bummed that this adds an extra line.
|
@DanGould whoops, i meant to say i switched it to |
IIUC, then I agree, for generic type names like |
|
@nothingmuch The 2nd commit change makes use of fully qualified errors, it creates a Result alias |
the use of |
From a comment in #456:
Updating to
db::Errormade sense, and I had to changedb::Result = Result<Vec<u8>, Error>toResult<T> = anyhow::Result<T, Error>sincepub async fn new(timeout: Duration, db_host: String) -> RedisResult<Self>didn't return aVec<u8>I wasn't sure about the
HandlerResultupdate. Inlib.rs, there are other functions such aslisten_tcpandlisten_tcp_with_tlsthat don't return aResultthat can be converted intoResult<Response<BoxBody<Bytes, hyper::Error>>, HandlerError>, so I didn't add the HandlerResult bit