Use the chars() iterator on &str, with the Peekable wrapper on Iterators, to iterate the input, rather than needing to hold the whole input and do iteration by indexes.
		
			
				
	
	
		
			6 lines
		
	
	
	
		
			109 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
	
		
			109 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
[package]
 | 
						|
name = "sibillexer"
 | 
						|
version = "0.1.0"
 | 
						|
authors = ["Eryn Wells <eryn@erynwells.me>"]
 | 
						|
 | 
						|
[dependencies]
 |