That way, it's more easily discoverable should people search for it.
Unified · Split
| @@ -1920,15 +1920,18 @@ mod parse { · 1919 unmodified lines | |||
| 1920 | [core] | 1920 | [core] |
| 1921 | a = 1 | 1921 | a = 1 |
| 1922 | "; | 1922 | "; |
| 1923 | let bytes_with_gb18030_bom = b"\x84\x31\x95\x33 | 1923 | let bytes_with_gb18030_bom = "\u{feff} |
| 1924 | [core] | 1924 | [core] |
| 1925 | a = 1 | 1925 | a = 1 |
| 1926 | "; | 1926 | "; |
| 1927 | 1927 | ||
| 1928 | assert_eq!(parse_from_bytes(bytes), parse_from_bytes(bytes_with_gb18030_bom)); | 1928 | assert_eq!( |
| 1929 | parse_from_bytes(bytes), | ||
| 1930 | parse_from_bytes(bytes_with_gb18030_bom.as_bytes()) | ||
| 1931 | ); | ||
| 1929 | assert_eq!( | 1932 | assert_eq!( |
| 1930 | parse_from_bytes_owned(bytes), | 1933 | parse_from_bytes_owned(bytes), |
| 1931 | parse_from_bytes_owned(bytes_with_gb18030_bom) | 1934 | parse_from_bytes_owned(bytes_with_gb18030_bom.as_bytes()) |
| 1932 | ); | 1935 | ); |
| 1933 | } | 1936 | } |
| 1934 | } | 1937 | } |