Derive partial eq for all objects so we can match radio links.
This commit is contained in:
		
							parent
							
								
									fec7d51f75
								
							
						
					
					
						commit
						6ed33d3522
					
				| @ -1,6 +1,6 @@ | ||||
| use super::source::Source; | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub enum Object<'s> { | ||||
|     RegularLink(RegularLink<'s>), | ||||
|     RadioLink(RadioLink<'s>), | ||||
| @ -14,59 +14,59 @@ pub enum Object<'s> { | ||||
|     PlainText(PlainText<'s>), | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct Bold<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct Italic<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct Underline<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct StrikeThrough<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct Code<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub contents: &'s str, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct Verbatim<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub contents: &'s str, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct PlainText<'s> { | ||||
|     pub source: &'s str, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct RegularLink<'s> { | ||||
|     pub source: &'s str, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct RadioTarget<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
| } | ||||
| 
 | ||||
| #[derive(Debug)] | ||||
| #[derive(Debug, PartialEq)] | ||||
| pub struct RadioLink<'s> { | ||||
|     pub source: &'s str, | ||||
|     pub children: Vec<Object<'s>>, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander