You've already forked comprehensive-rust
							
							
				mirror of
				https://github.com/google/comprehensive-rust.git
				synced 2025-10-31 00:27:50 +02:00 
			
		
		
		
	Indent code in speaker notes (#476)
* Indent code in speaker notes #475 * Update stack.md * Update destructuring-arrays.md * Update hashmap.md * Update traits.md
This commit is contained in:
		| @@ -42,8 +42,7 @@ fn main() { | ||||
| * Types that implement a given trait may be of different sizes. This makes it impossible to have things like `Vec<Greet>` in the example above. | ||||
| * `dyn Greet` is a way to tell the compiler about a dynamically sized type that implements `Greet`. | ||||
| * In the example, `pets` holds Fat Pointers to objects that implement `Greet`. The Fat Pointer consists of two components, a pointer to the actual object and a pointer to the virtual method table for the `Greet` implementation of that particular object. | ||||
|  | ||||
| Compare these outputs in the above example: | ||||
| * Compare these outputs in the above example: | ||||
|      ```rust,ignore | ||||
|          println!("{} {}", std::mem::size_of::<Dog>(), std::mem::size_of::<Cat>()); | ||||
|          println!("{} {}", std::mem::size_of::<&Dog>(), std::mem::size_of::<&Cat>()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user