include README.md in doctest, fix example
This commit is contained in:
		
							parent
							
								
									333cf954f8
								
							
						
					
					
						commit
						1a69cb0932
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -18,7 +18,7 @@ fn main() {
 | 
			
		|||
        .expect("connection failed");
 | 
			
		||||
 | 
			
		||||
    // clear screen content
 | 
			
		||||
    connection.send(servicepoint::Command::Clear.into())
 | 
			
		||||
    connection.send(servicepoint::Command::Clear)
 | 
			
		||||
        .expect("send failed");
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,3 +42,8 @@ pub const PIXEL_COUNT: usize = PIXEL_WIDTH * PIXEL_HEIGHT;
 | 
			
		|||
 | 
			
		||||
/// Actual hardware limit is around 28-29ms/frame. Rounded up for less dropped packets.
 | 
			
		||||
pub const FRAME_PACING: Duration = Duration::from_millis(30);
 | 
			
		||||
 | 
			
		||||
// include README.md in doctest
 | 
			
		||||
#[doc = include_str!("../README.md")]
 | 
			
		||||
#[cfg(doctest)]
 | 
			
		||||
pub struct ReadmeDocTests;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue