Fix building without compare feature.
This commit is contained in:
		
							parent
							
								
									5686256039
								
							
						
					
					
						commit
						2cd6f736c2
					
				| @ -37,10 +37,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | ||||
| 
 | ||||
| #[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))] | ||||
| fn main_body() -> Result<(), Box<dyn std::error::Error>> { | ||||
|     #[cfg(not(feature = "compare"))] | ||||
|     let org_contents = ""; | ||||
|     #[cfg(feature = "compare")] | ||||
|     let org_contents = read_stdin_to_string()?; | ||||
|     run_compare(org_contents) | ||||
| } | ||||
| 
 | ||||
| #[cfg(feature = "compare")] | ||||
| fn read_stdin_to_string() -> Result<String, Box<dyn std::error::Error>> { | ||||
|     let mut stdin_contents = String::new(); | ||||
|     std::io::stdin() | ||||
| @ -75,7 +79,7 @@ fn run_compare<P: AsRef<str>>(org_contents: P) -> Result<(), Box<dyn std::error: | ||||
| } | ||||
| 
 | ||||
| #[cfg(not(feature = "compare"))] | ||||
| fn run_compare<P: AsRef<Path>>(_todo_org_path: P) -> Result<(), Box<dyn std::error::Error>> { | ||||
| fn run_compare<P: AsRef<str>>(_org_contents: P) -> Result<(), Box<dyn std::error::Error>> { | ||||
|     println!("This program was built with compare disabled. Doing nothing."); | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander