let path = "/etc/app.conf";
let width = 12;
// *** 以前 ***
panic!("cannot read the file {}", path);
assert!(width > 0, "the width {} is wrong", width);
let line = format!("{:>1$}", path, width);
// *** 在 1.58 版本中 ***
panic!("cannot read the file {path}");
assert!(width > 0, "the width {width} is wrong");
let line = format!("{path:>width$}"); // 宽度同样可以按名称传入