Mercurial > lbo > hg > rex
changeset 51:c716f45706fd
Prefix trait types with 'dyn'
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Fri, 30 Aug 2019 12:41:40 +0200 |
parents | f0843388fd96 |
children | ede40946675b |
files | src/matcher.rs src/state.rs |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/matcher.rs Fri Jul 19 18:18:43 2019 +0200 +++ b/src/matcher.rs Fri Aug 30 12:41:40 2019 +0200 @@ -128,7 +128,7 @@ } } -pub fn wrap_matcher(m: Box<Matcher>) -> Option<Rc<Box<Matcher>>> { +pub fn wrap_matcher(m: Box<dyn Matcher>) -> Option<Rc<Box<dyn Matcher>>> { Some(Rc::new(m)) }
--- a/src/state.rs Fri Jul 19 18:18:43 2019 +0200 +++ b/src/state.rs Fri Aug 30 12:41:40 2019 +0200 @@ -20,7 +20,7 @@ pub out: Option<WrappedState>, pub out1: Option<WrappedState>, // If matcher is none, this is an "empty" state. - pub matcher: Option<Rc<Box<Matcher>>>, + pub matcher: Option<Rc<Box<dyn Matcher>>>, // Tells the matching logic to record the start or end of a submatch. pub sub: Option<Submatch>, }