Closed
Description
If I run:
$ rustfmt --version
0.8.3 ()
with such code:
fn test() -> Result<i32, String> {
let r: Result<i32, String> = Ok(17);
r.map_err(|err| format!("Someting really, really wrong, may be flash in the sun : {}", err))?;
Ok(15)
}
rustfmt works without problem, but if I place the same amount of chars (not bytes) into line:
fn test() -> Result<i32, String> {
let r: Result<i32, String> = Ok(17);
r.map_err(|err| format!("Что-то пошло совсем не так, может быть вспышка на солнце: {}", err))?;
Ok(15)
}
it reports error: line exceeded maximum length (maximum: 100, found: 144) (sorry)
rustfmt should work with chars, not bytes, because of editors/code review tools and so on,
display both code examples using the same amount of horizontal space.