Fix clippy.
This commit is contained in:
		
							parent
							
								
									e24fcb9ded
								
							
						
					
					
						commit
						5a8159eed7
					
				| @ -285,7 +285,7 @@ where | ||||
| pub(crate) fn compare_children<'b, 's, 'x, RC>( | ||||
|     source: &'s str, | ||||
|     emacs: &'b Token<'s>, | ||||
|     rust_children: &'x Vec<RC>, | ||||
|     rust_children: &'x [RC], | ||||
|     child_status: &mut Vec<DiffEntry<'b, 's>>, | ||||
|     this_status: &mut DiffStatus, | ||||
|     message: &mut Option<String>, | ||||
|  | ||||
| @ -27,7 +27,7 @@ pub(crate) fn record_event(event_type: EventType, input: OrgSource<'_>) { | ||||
| pub fn report(original_document: &str) { | ||||
|     let mut db = GLOBAL_DATA.lock().unwrap(); | ||||
|     let db = db.get_or_insert_with(HashMap::new); | ||||
|     let mut results: Vec<_> = db.iter().map(|(k, v)| (k, v)).collect(); | ||||
|     let mut results: Vec<_> = db.iter().collect(); | ||||
|     results.sort_by_key(|(_k, v)| *v); | ||||
|     // This would put the most common at the top, but that is a pain when there is already a lot of output from the parser.
 | ||||
|     // results.sort_by(|(_ak, av), (_bk, bv)| bv.cmp(av));
 | ||||
|  | ||||
| @ -84,7 +84,7 @@ pub(crate) fn broken_end<'b, 'g, 'r, 's>( | ||||
|             Paragraph::of_text( | ||||
|                 input.get_until(remaining).into(), | ||||
|                 body, | ||||
|                 if body.len() > 0 { Some(body) } else { None }, | ||||
|                 if !body.is_empty() { Some(body) } else { None }, | ||||
|                 post_blank.map(Into::<&str>::into), | ||||
|             ), | ||||
|         )) | ||||
| @ -145,7 +145,7 @@ pub(crate) fn broken_dynamic_block<'b, 'g, 'r, 's>( | ||||
|             Paragraph::of_text( | ||||
|                 input.get_until(remaining).into(), | ||||
|                 body, | ||||
|                 if body.len() > 0 { Some(body) } else { None }, | ||||
|                 if !body.is_empty() { Some(body) } else { None }, | ||||
|                 post_blank.map(Into::<&str>::into), | ||||
|             ), | ||||
|         )) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander