Skip to content

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jul 21, 2020

Just that I prefer constants over functions that can be made const.

@rust-highfive
Copy link
Contributor

r? @dtolnay

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2020
@dtolnay dtolnay added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jul 21, 2020
@dtolnay
Copy link
Member

dtolnay commented Jul 21, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 21, 2020

📌 Commit e96230d has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 21, 2020
@tesuji
Copy link
Contributor Author

tesuji commented Jul 22, 2020

@bors rollup=always

@bors
Copy link
Collaborator

bors commented Jul 22, 2020

@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
Copy link
Member

@bors r-

#74647 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 22, 2020
@dtolnay
Copy link
Member

dtolnay commented Jul 23, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 23, 2020

📌 Commit 0de7fad has been approved by dtolnay

@bors
Copy link
Collaborator

bors commented Jul 23, 2020

🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels 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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@bors bors merged commit bea2eed into rust-lang:master Jul 23, 2020
@tesuji tesuji deleted the consts branch July 23, 2020 10:56
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants