We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
暂无
impl fmt::Display for ColoredString { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut input = &self.input.clone(); // 此处应该是let input = &self.input.clone(); try!(f.write_str(&self.compute_style())); // 此处应该是f.write_str(&self.compute_style())?; try!(f.write_str(input)); // 此处应该是f.write_str(input)?; try!(f.write_str("\x1B[0m")); // 此处应该是f.write_str("\x1B[0m")?; Ok(()) } }
$ rustc -V rustc 1.67.1 (d5a82bbd2 2023-02-07)
warning: variable does not need to be mutable --> src/color.rs:78:13 | 78 | let mut input = &self.input.clone(); | ----^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: use of deprecated macro `try`: use the `?` operator instead --> src/color.rs:79:9 | 79 | try!(f.write_str(&self.compute_style())); | ^^^ | = note: `#[warn(deprecated)]` on by default warning: use of deprecated macro `try`: use the `?` operator instead --> src/color.rs:80:9 | 80 | try!(f.write_str(input)); | ^^^ warning: use of deprecated macro `try`: use the `?` operator instead --> src/color.rs:81:9 | 81 | try!(f.write_str("\x1B[0m")); | ^^^
The text was updated successfully, but these errors were encountered:
感谢反馈。这个代码过期了。try! 已经过期,被 ? 替代。
try!
?
Sorry, something went wrong.
No branches or pull requests
页码与行数
文本或排版错误
代码错误
Rust版本
错误信息
The text was updated successfully, but these errors were encountered: