serde: Upgrade itoa 0.4 => 1.0
This commit is contained in:
		
							parent
							
								
									f9b9112d07
								
							
						
					
					
						commit
						2547db74e9
					
				| @ -11,7 +11,7 @@ edition = "2018" | ||||
| base64 = "0.13.0" | ||||
| bytes = "1.0.1" | ||||
| form_urlencoded = "1.0.0" | ||||
| itoa = "0.4.6" | ||||
| itoa = "1.0.1" | ||||
| js_int = { version = "0.2.0", features = ["serde"] } | ||||
| ruma-serde-macros = { version = "=0.5.0", path = "../ruma-serde-macros" } | ||||
| serde = { version = "1.0.118", features = ["derive"] } | ||||
|  | ||||
| @ -198,9 +198,8 @@ impl<S: Sink> PartSerializer<S> { | ||||
|     where | ||||
|         I: itoa::Integer, | ||||
|     { | ||||
|         let mut buf = [b'\0'; 20]; | ||||
|         let len = itoa::write(&mut buf[..], value).unwrap(); | ||||
|         let part = unsafe { str::from_utf8_unchecked(&buf[0..len]) }; | ||||
|         let mut buf = itoa::Buffer::new(); | ||||
|         let part = buf.format(value); | ||||
|         ser::Serializer::serialize_str(self, part) | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user