added workspaces example
This commit is contained in:
		
							parent
							
								
									eb0612b93b
								
							
						
					
					
						commit
						aec66ef7c8
					
				
					 5 changed files with 42 additions and 0 deletions
				
			
		
							
								
								
									
										9
									
								
								the_book/workspaces/adder/Cargo.toml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								the_book/workspaces/adder/Cargo.toml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
[package]
 | 
			
		||||
name = "adder"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
add_one = {path = "../add_one"}
 | 
			
		||||
							
								
								
									
										6
									
								
								the_book/workspaces/adder/src/main.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								the_book/workspaces/adder/src/main.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
use add_one;
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    let num = 10;
 | 
			
		||||
    println!("Hello World! {} plus 1 is {}", num, add_one::add_one(num));
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue