]> git.lizzy.rs Git - rust.git/blobdiff - Contributing.md
Cargo fmt
[rust.git] / Contributing.md
index 730cefdca45490bdbc12d1dc01d330d23ee883f0..ac3659c5cc749e239e91641f02eb471daf4f5e44 100644 (file)
@@ -2,10 +2,12 @@
 
 There are many ways to contribute to Rustfmt. This document lays out what they
 are and has information for how to get started. If you have any questions about
-contributing or need help with anything, please ping nrc on irc, #rust-tools is
-probably the best channel. Feel free to also ask questions on issues, or file
-new issues specifically to get help.
+contributing or need help with anything, please ping nrc on irc, #rust-dev-tools
+on irc.mozilla.org is probably the best channel. Feel free to also ask questions
+on issues, or file new issues specifically to get help.
 
+All contributors are expected to follow our [Code of
+Conduct](CODE_OF_CONDUCT.md).
 
 ## Test and file issues
 
@@ -65,7 +67,7 @@ example, the `issue-1111.rs` test file is configured by the file
 
 ## Hack!
 
-Here are some [good starting issues](https://github.com/rust-lang-nursery/rustfmt/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy).
+Here are some [good starting issues](https://github.com/rust-lang-nursery/rustfmt/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-issue).
 
 If you've found areas which need polish and don't have issues, please submit a
 PR, don't feel there needs to be an issue.
@@ -184,13 +186,13 @@ places) is for the caller to shuffle around some of its other items to make
 more width, then call the function again with more space.
 
 Since it is common for callers to bail out when a callee fails, we often use a
-`try_opt!` macro to make this pattern more succinct.
+`?` operator to make this pattern more succinct.
 
 One way we might find out that we don't have enough space is when computing how much
 space we have. Something like `available_space = budget - overhead`. Since
 widths are unsized integers, this would cause underflow. Therefore we use
-checked subtraction: `available_space = try_opt!(budget.checked_sub(overhead))`.
-`checked_sub` returns an `Option`, and if we would underflow `try_opt!` returns
+checked subtraction: `available_space = budget.checked_sub(overhead)?`.
+`checked_sub` returns an `Option`, and if we would underflow `?` returns
 `None`, otherwise we proceed with the computed space.
 
 Much syntax in Rust is lists: lists of arguments, lists of fields, lists of