Return a Result in invert_location (#3730)

* Return a Result in invert_location

* Add invertible to spellcheck dictionary

* Fix Some -> Ok
This commit is contained in:
Keith Yeung
2021-08-27 17:17:51 -07:00
committed by GitHub
parent 636d0b030f
commit 64cbeab3b3
8 changed files with 56 additions and 28 deletions
@@ -200,5 +200,5 @@ impl<O> ConvertOrigin<O> for Tuple {
/// Means of inverting a location: given a location which describes a `target` interpreted from the
/// `source`, this will provide the corresponding location which describes the `source`.
pub trait InvertLocation {
fn invert_location(l: &MultiLocation) -> MultiLocation;
fn invert_location(l: &MultiLocation) -> Result<MultiLocation, ()>;
}