エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Automatically replace all try!() with `?`
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Automatically replace all try!() with `?`
If you've got code that still uses the try!() macro, you can quickly and accurately upgrade it to... If you've got code that still uses the try!() macro, you can quickly and accurately upgrade it to the ? operator. Create rules.rs file with: fn rule1<T,E,X: From<E>>(r: Result<T,E>) -> Result<T,X> { replace!(r#try!(r) => r?); unreachable!() } Then run: rustup update cargo +nightly install rerast cargo +nightly rerast --rules_file=rules.rs --force and poof! the macro will be gone. Rerast operates o

