Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Change to_namespaced_keyword(s) to return a Result #333

Merged
merged 1 commit into from Feb 18, 2017

Conversation

jsantell
Copy link
Contributor

Change to_namespaced_keyword(s) to return a Result rather than Option to reduce error handling throughout db code. Fixes #331. I think this is a good approach for reducing the to-be-implemented custom ErrorKind throughout code. You mentioned combining it into schema.require_entid, but that's a different usage (it checks the ident_map).

reduce error handling throughout db code. Fixes mozilla#331. r=nalexander
Copy link
Member

@ncalexan ncalexan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification.

@@ -11,7 +11,7 @@
#![allow(dead_code)]

use entids;
use errors::*;
use errors::{ErrorKind, Result};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting that error-chain explicitly suggests use * here; but I'd rather we're happy, so keep it.

@jsantell jsantell merged commit bc2b2ec into mozilla:rust Feb 18, 2017
@jsantell jsantell deleted the to_nsk_result branch February 18, 2017 00:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants