Uh oh!
There was an error while loading. Please reload this page.
Prefer constant over function - #74587
Merged
Merged
Conversation
rust-highfive
commented
Jul 21, 2020
Contributor
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
dtolnay
approved these changes
Jul 21, 2020
dtolnay
commented
Jul 21, 2020
Member
@bors r+ |
bors
commented
Jul 21, 2020
Collaborator
📌 Commit e96230d has been approved by |
tesuji
commented
Jul 22, 2020
ContributorAuthor
@bors rollup=always |
bors
commented
Jul 22, 2020
Collaborator
@lzutao: 🔑 Insufficient privileges: not in try users |
Manishearth added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
Prefer constant over function Just that I prefer constants over functions that can be made const.
Manishearth
commented
Jul 22, 2020
Member
dtolnay
approved these changes
Jul 23, 2020
dtolnay
commented
Jul 23, 2020
Member
@bors r+ |
bors
commented
Jul 23, 2020
Collaborator
📌 Commit 0de7fad has been approved by |
bors
commented
Jul 23, 2020
Collaborator
🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened |
tesuji
commented
Jul 23, 2020
| #[cfg(target_os = "macos")] | ||
| const READ_LIMIT: usize = c_int::MAX as usize - 1; | ||
| #[cfg(not(target_os = "macos"))] | ||
| const READ_LIMIT: usize = libc::ssize_t::MAX as usize; |
ContributorAuthor
There was a problem hiding this comment.
I wonder can we use isize::MAX instead?
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 23, 2020
…arth Rollup of 8 pull requests Successful merges: - rust-lang#74141 (libstd/libcore: fix various typos) - rust-lang#74490 (add a Backtrace::disabled function) - rust-lang#74548 (one more Path::with_extension example, to demonstrate behavior) - rust-lang#74587 (Prefer constant over function) - rust-lang#74606 (Remove Linux workarounds for missing CLOEXEC support) - rust-lang#74637 (Make str point to primitive page) - rust-lang#74654 (require type defaults to be after const generic parameters) - rust-lang#74659 (Improve codegen for unchecked float casts on wasm) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just that I prefer constants over functions that can be made const.