Skip to content

Commit bebd763

Browse files
authored
Merge pull request #317 from drewcrawford/generic2
Make .get_path generic
2 parents 88c553d + a3598f8 commit bebd763

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/memory.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ impl MemoryReference {
256256
/// `undefined`, and `Err` if incorrect type.
257257
///
258258
/// Uses lodash in JavaScript to evaluate the path. See https://lodash.com/docs/#get.
259-
pub fn get_path<T>(&self, path: &str) -> Result<Option<T>, ConversionError>
259+
pub fn get_path<T>(&self, path: &str) -> Result<Option<T>, <T as TryFrom<Value>>::Error>
260260
where
261-
T: TryFrom<Value, Error = ConversionError>,
261+
T: TryFrom<Value>,
262262
{
263263
let val = js! {
264264
return _.get(@{self.as_ref()}, @{path});

0 commit comments

Comments
 (0)