Skip to content

Commit

Permalink
Strengthen value trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Apr 16, 2024
1 parent e73b62b commit 9b29772
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jaq-interpret/src/val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ fn rc_unwrap_or_clone<T: Clone>(a: Rc<T>) -> T {
Rc::try_unwrap(a).unwrap_or_else(|a| (*a).clone())
}

pub(crate) trait ValT: Clone + Sized {
pub(crate) trait ValT:
Clone + From<bool> + From<isize> + From<String> + FromIterator<Self>
{
/// If `Ok(k)` is in `v.keys()`, then
/// `v.index(k)` must be `Ok(_)` and in `v.range(Range::default())`.
fn values(self) -> Box<dyn Iterator<Item = Result<Self, Error>>>;
Expand Down

0 comments on commit 9b29772

Please sign in to comment.