Skip to content
New issue

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

Add a method to query the capacity of a BufWriter and BufReader #68558

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

HeroicKatora
Copy link
Contributor

@HeroicKatora HeroicKatora commented Jan 26, 2020

Besides the obvious of retrieving the parameter used to construct the writer, this method allows consumers to control the number of flush calls during write operations. For BufReader it gives an upper bound on the returned buffer in fill_buf which might influence the allocation behaviour of a consumer.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(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 Jan 26, 2020
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-26T22:29:26.4854243Z ========================== Starting Command Output ===========================
2020-01-26T22:29:26.4872304Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/b901e653-9795-4fc0-abab-36e0a6d692d0.sh
2020-01-26T22:29:26.5076425Z 
2020-01-26T22:29:26.5136184Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-26T22:29:26.5143220Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-26T22:29:26.5144850Z Task         : Get sources
2020-01-26T22:29:26.5144890Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-26T22:29:26.5144926Z Version      : 1.0.0
2020-01-26T22:29:26.5145013Z Author       : Microsoft
---
2020-01-26T22:29:27.3720341Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-26T22:29:27.3802697Z ##[command]git config gc.auto 0
2020-01-26T22:29:27.3887718Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-26T22:29:27.3942469Z ##[command]git config --get-all http.proxy
2020-01-26T22:29:27.4108997Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68558/merge:refs/remotes/pull/68558/merge
---
2020-01-26T22:34:04.7423350Z   local time: Sun Jan 26 22:34:04 UTC 2020
2020-01-26T22:34:05.0264118Z   network time: Sun, 26 Jan 2020 22:34:05 GMT
2020-01-26T22:34:05.0267530Z == end clock drift check ==
2020-01-26T22:34:06.0457033Z 
2020-01-26T22:34:06.0554169Z ##[error]Bash exited with code '1'.
2020-01-26T22:34:06.0566926Z ##[section]Finishing: Run build
2020-01-26T22:34:06.0582628Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-26T22:34:06.0584979Z Task         : Get sources
2020-01-26T22:34:06.0585049Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-26T22:34:06.0585101Z Version      : 1.0.0
2020-01-26T22:34:06.0585149Z Author       : Microsoft
2020-01-26T22:34:06.0585149Z Author       : Microsoft
2020-01-26T22:34:06.0585217Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-26T22:34:06.0585275Z ==============================================================================
2020-01-26T22:34:06.4831226Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-26T22:34:06.4874023Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-26T22:34:06.4989019Z Cleaning up task key
2020-01-26T22:34:06.4990028Z Start cleaning up orphan processes.
2020-01-26T22:34:06.5115831Z Terminate orphan process: pid (3367) (python)
2020-01-26T22:34:06.5342428Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

Seems plausible to me, thanks!

This'll want to get tagged as an #[unstable] API, and it may be good to go ahead and mirror it onto BufReader as well?

@HeroicKatora
Copy link
Contributor Author

[...] it may be good to go ahead and mirror it onto BufReader as well?

I don't see why not, it also relates to the length of the buffer returned from a call to fill_buf.

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-27T18:13:48.7645204Z ========================== Starting Command Output ===========================
2020-01-27T18:13:48.7647183Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/78cd13aa-bd0b-4273-8a6a-cd436fd5d96f.sh
2020-01-27T18:13:48.7647348Z 
2020-01-27T18:13:48.7650329Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-27T18:13:48.7656240Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T18:13:48.7658077Z Task         : Get sources
2020-01-27T18:13:48.7658113Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-27T18:13:48.7658148Z Version      : 1.0.0
2020-01-27T18:13:48.7658182Z Author       : Microsoft
---
2020-01-27T18:13:49.5764661Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-27T18:13:49.5863031Z ##[command]git config gc.auto 0
2020-01-27T18:13:49.5937764Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-27T18:13:49.5986491Z ##[command]git config --get-all http.proxy
2020-01-27T18:13:49.6121130Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68558/merge:refs/remotes/pull/68558/merge
---
2020-01-27T18:18:27.3040115Z     Checking panic_abort v0.0.0 (/checkout/src/libpanic_abort)
2020-01-27T18:18:27.4602453Z     Checking backtrace v0.3.40
2020-01-27T18:18:28.6163799Z     Checking rustc-std-workspace-alloc v1.99.0 (/checkout/src/tools/rustc-std-workspace-alloc)
2020-01-27T18:18:28.6168532Z     Checking panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
2020-01-27T18:18:30.6035364Z error[E0599]: no method named `capacity` found for type `alloc_crate::boxed::Box<[u8]>` in the current scope
2020-01-27T18:18:30.6037974Z     |
2020-01-27T18:18:30.6038833Z 202 |         self.buf.capacity()
2020-01-27T18:18:30.6039856Z     |                  ^^^^^^^^ method not found in `alloc_crate::boxed::Box<[u8]>`
2020-01-27T18:18:30.6040245Z 
---
2020-01-27T18:18:31.4724600Z   local time: Mon Jan 27 18:18:31 UTC 2020
2020-01-27T18:18:31.7601459Z   network time: Mon, 27 Jan 2020 18:18:31 GMT
2020-01-27T18:18:31.7601601Z == end clock drift check ==
2020-01-27T18:18:32.7773303Z 
2020-01-27T18:18:32.7835219Z ##[error]Bash exited with code '1'.
2020-01-27T18:18:32.7846882Z ##[section]Finishing: Run build
2020-01-27T18:18:32.7862614Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T18:18:32.7864536Z Task         : Get sources
2020-01-27T18:18:32.7864587Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-27T18:18:32.7864638Z Version      : 1.0.0
2020-01-27T18:18:32.7864701Z Author       : Microsoft
2020-01-27T18:18:32.7864701Z Author       : Microsoft
2020-01-27T18:18:32.7864750Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-27T18:18:32.7864804Z ==============================================================================
2020-01-27T18:18:33.1708580Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-27T18:18:33.1756445Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T18:18:33.1866937Z Cleaning up task key
2020-01-27T18:18:33.1867863Z Start cleaning up orphan processes.
2020-01-27T18:18:33.1975570Z Terminate orphan process: pid (3455) (python)
2020-01-27T18:18:33.2162838Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-27T20:17:12.3067557Z ========================== Starting Command Output ===========================
2020-01-27T20:17:12.3069519Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/b6728f21-1b1d-409b-8bfb-b499aade79be.sh
2020-01-27T20:17:12.3069707Z 
2020-01-27T20:17:12.3072296Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-27T20:17:12.3077941Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T20:17:12.3079493Z Task         : Get sources
2020-01-27T20:17:12.3079531Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-27T20:17:12.3079566Z Version      : 1.0.0
2020-01-27T20:17:12.3079601Z Author       : Microsoft
---
2020-01-27T20:17:14.2798495Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-27T20:17:14.2819495Z ##[command]git config gc.auto 0
2020-01-27T20:17:14.2823449Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-27T20:17:14.2826660Z ##[command]git config --get-all http.proxy
2020-01-27T20:17:14.2836969Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68558/merge:refs/remotes/pull/68558/merge
---
2020-01-27T21:07:11.0732699Z .................................................................................................... 1700/9556
2020-01-27T21:07:15.8801743Z .................................................................................................... 1800/9556
2020-01-27T21:07:27.0801904Z ........................i........................................................................... 1900/9556
2020-01-27T21:07:33.4381792Z .................................................................................................... 2000/9556
2020-01-27T21:07:46.5294578Z ..............iiiii................................................................................. 2100/9556
2020-01-27T21:07:55.3293368Z .................................................................................................... 2300/9556
2020-01-27T21:07:57.4587012Z .................................................................................................... 2400/9556
2020-01-27T21:08:02.1930638Z .................................................................................................... 2500/9556
2020-01-27T21:08:20.4864493Z .................................................................................................... 2600/9556
---
2020-01-27T21:10:41.1491540Z .................................................................................................... 4800/9556
2020-01-27T21:10:45.7587980Z ..........................................................i...............i......................... 4900/9556
2020-01-27T21:10:52.9975985Z .................................................................................................... 5000/9556
2020-01-27T21:11:00.1434389Z .................................................................................................... 5100/9556
2020-01-27T21:11:04.4951704Z .i.................................................................................................. 5200/9556
2020-01-27T21:11:14.3963352Z ..........................................................................ii.ii........i...i........ 5300/9556
2020-01-27T21:11:22.2373533Z ............i....................................................................................... 5500/9556
2020-01-27T21:11:31.1722475Z .................................................................................................... 5600/9556
2020-01-27T21:11:36.9079566Z .............................................................i...................................... 5700/9556
2020-01-27T21:11:43.4041363Z .................................................................................................... 5800/9556
2020-01-27T21:11:43.4041363Z .................................................................................................... 5800/9556
2020-01-27T21:11:50.6626009Z .................................................................................................... 5900/9556
2020-01-27T21:11:58.5165158Z ....................................................ii...i..ii...........i.......................... 6000/9556
2020-01-27T21:12:18.4256497Z .................................................................................................... 6200/9556
2020-01-27T21:12:23.8476868Z .................................................................................................... 6300/9556
2020-01-27T21:12:23.8476868Z .................................................................................................... 6300/9556
2020-01-27T21:12:27.9020191Z ................................................................................i..ii............... 6400/9556
2020-01-27T21:12:51.8334296Z .................................................................................................... 6600/9556
2020-01-27T21:12:56.7284922Z ........................................................i........................................... 6700/9556
2020-01-27T21:12:58.7423276Z .................................................................................................... 6800/9556
2020-01-27T21:13:00.7788961Z .......................................................i............................................ 6900/9556
---
2020-01-27T21:14:30.9231978Z .................................................................................................... 7600/9556
2020-01-27T21:14:35.7020752Z .................................................................................................... 7700/9556
2020-01-27T21:14:41.7062816Z .................................................................................................... 7800/9556
2020-01-27T21:14:51.3004851Z .................................................................................................... 7900/9556
2020-01-27T21:14:56.8371301Z ...........iiiiiii.................................................................................. 8000/9556
2020-01-27T21:15:09.8718233Z .................................................................................................... 8200/9556
2020-01-27T21:15:19.6279892Z .................................................................................................... 8300/9556
2020-01-27T21:15:31.6458430Z .................................................................................................... 8400/9556
2020-01-27T21:15:37.5781620Z .................................................................................................... 8500/9556
---
2020-01-27T21:17:48.5881998Z  finished in 6.808
2020-01-27T21:17:48.6073124Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:17:48.8007738Z 
2020-01-27T21:17:48.8007999Z running 169 tests
2020-01-27T21:17:51.7007715Z iiii......i........ii..iiii...i....i...........i............i..i..................i....i............ 100/169
2020-01-27T21:17:53.7430285Z i.i.i...iii..iiiiiiiiii.......................iii............ii......
2020-01-27T21:17:53.7430846Z 
2020-01-27T21:17:53.7434252Z  finished in 5.136
2020-01-27T21:17:53.7618083Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:17:53.9217159Z 
---
2020-01-27T21:17:55.7795926Z  finished in 2.017
2020-01-27T21:17:55.7985111Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:17:55.9535772Z 
2020-01-27T21:17:55.9536632Z running 9 tests
2020-01-27T21:17:55.9537703Z iiiiiiiii
2020-01-27T21:17:55.9538466Z 
2020-01-27T21:17:55.9541254Z  finished in 0.155
2020-01-27T21:17:55.9740098Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:17:56.1612086Z 
---
2020-01-27T21:18:14.8018348Z  finished in 18.827
2020-01-27T21:18:14.8260391Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:18:15.0449612Z 
2020-01-27T21:18:15.0466376Z running 116 tests
2020-01-27T21:18:28.3328606Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii. 100/116
2020-01-27T21:18:30.1072324Z ....iiii.....ii.
2020-01-27T21:18:30.1072797Z 
2020-01-27T21:18:30.1076306Z  finished in 15.281
2020-01-27T21:18:30.1082114Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-27T21:18:30.1082445Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-01-27T21:30:26.3395266Z 
2020-01-27T21:30:26.3396423Z    Doc-tests core
2020-01-27T21:30:30.6655279Z 
2020-01-27T21:30:30.6656579Z running 2467 tests
2020-01-27T21:30:38.9309526Z ......iiiii......................................................................................... 100/2467
2020-01-27T21:30:46.9953910Z ..................................................................................ii................ 200/2467
2020-01-27T21:31:05.8696646Z .................i.................................................................................. 400/2467
2020-01-27T21:31:05.8696646Z .................i.................................................................................. 400/2467
2020-01-27T21:31:15.0950492Z ..................................................................i..i..................iiii........ 500/2467
2020-01-27T21:31:30.9253091Z .................................................................................................... 700/2467
2020-01-27T21:31:39.1512078Z .................................................................................................... 800/2467
2020-01-27T21:31:47.2298332Z .................................................................................................... 900/2467
2020-01-27T21:31:55.2472017Z .................................................................................................... 1000/2467
---
2020-01-27T21:35:00.6790853Z .................................................................................................... 500/760
2020-01-27T21:35:00.7041865Z .................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2741:22
2020-01-27T21:35:00.7064858Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2778:21
2020-01-27T21:35:00.7065310Z thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-01-27T21:35:00.7078227Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2645:13
2020-01-27T21:35:01.0022376Z ..........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-01-27T21:35:01.0084186Z .....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', .src/libstd/sync/mpsc/mod.rs:2034:21
2020-01-27T21:35:01.0113367Z .....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-01-27T21:35:03.0758446Z ...................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-01-27T21:35:03.0771600Z ..thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
2020-01-27T21:35:03.0781329Z ...thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:563:13
2020-01-27T21:35:03.0790044Z .thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:694:13
---
2020-01-27T21:35:12.0003511Z 
2020-01-27T21:35:12.0003800Z running 1005 tests
2020-01-27T21:35:28.5286171Z i................................................................................................... 100/1005
2020-01-27T21:35:38.1164322Z .................................................................................................... 200/1005
2020-01-27T21:35:45.0021912Z ..................iii......i......i...i......i...................................................... 300/1005
2020-01-27T21:35:49.7004649Z .................................F........F......................................................... 400/1005
2020-01-27T21:35:56.2089273Z ............................................i..i.....................................ii............. 500/1005
2020-01-27T21:36:08.4129710Z .................................................................................................... 700/1005
2020-01-27T21:36:08.4129710Z .................................................................................................... 700/1005
2020-01-27T21:36:14.4955725Z ...............................iiii................................................................. 800/1005
2020-01-27T21:36:27.3999207Z .................................................................................................... 900/1005
2020-01-27T21:36:33.5533018Z .....................................................iiii........................................... 1000/1005
2020-01-27T21:36:33.7516885Z failures:
2020-01-27T21:36:33.7517910Z 
2020-01-27T21:36:33.7523139Z ---- io/buffered.rs - io::buffered::BufReader<R>::capacity (line 186) stdout ----
2020-01-27T21:36:33.7523139Z ---- io/buffered.rs - io::buffered::BufReader<R>::capacity (line 186) stdout ----
2020-01-27T21:36:33.7523472Z error[E0658]: use of unstable library feature 'buffered_io_capacity'
2020-01-27T21:36:33.7523908Z   --> io/buffered.rs:194:27
2020-01-27T21:36:33.7524063Z 10 |     let capacity = reader.capacity();
2020-01-27T21:36:33.7524229Z    |                           ^^^^^^^^
2020-01-27T21:36:33.7524519Z    |
2020-01-27T21:36:33.7524519Z    |
2020-01-27T21:36:33.7524961Z    = note: for more information, see ***/issues/68558
2020-01-27T21:36:33.7525153Z    = help: add `#![feature(buffered_io_capacity)]` to the crate attributes to enable
2020-01-27T21:36:33.7525382Z error: aborting due to previous error
2020-01-27T21:36:33.7525537Z 
2020-01-27T21:36:33.7525928Z For more information about this error, try `rustc --explain E0658`.
2020-01-27T21:36:33.7526147Z Couldn't compile the test.
2020-01-27T21:36:33.7526147Z Couldn't compile the test.
2020-01-27T21:36:33.7526538Z ---- io/buffered.rs - io::buffered::BufWriter<W>::capacity (line 606) stdout ----
2020-01-27T21:36:33.7526934Z error[E0658]: use of unstable library feature 'buffered_io_capacity'
2020-01-27T21:36:33.7527421Z   --> io/buffered.rs:613:27
2020-01-27T21:36:33.7527720Z 10 | let capacity = buf_writer.capacity();
2020-01-27T21:36:33.7527772Z    |                           ^^^^^^^^
2020-01-27T21:36:33.7527858Z    |
2020-01-27T21:36:33.7527858Z    |
2020-01-27T21:36:33.7528194Z    = note: for more information, see ***/issues/68558
2020-01-27T21:36:33.7528367Z    = help: add `#![feature(buffered_io_capacity)]` to the crate attributes to enable
2020-01-27T21:36:33.7528507Z error: aborting due to previous error
2020-01-27T21:36:33.7528561Z 
2020-01-27T21:36:33.7528861Z For more information about this error, try `rustc --explain E0658`.
2020-01-27T21:36:33.7529206Z Couldn't compile the test.
---
2020-01-27T21:36:33.7723752Z   local time: Mon Jan 27 21:36:33 UTC 2020
2020-01-27T21:36:33.9398794Z   network time: Mon, 27 Jan 2020 21:36:33 GMT
2020-01-27T21:36:33.9398943Z == end clock drift check ==
2020-01-27T21:36:34.2809569Z 
2020-01-27T21:36:34.2902945Z ##[error]Bash exited with code '1'.
2020-01-27T21:36:34.2916182Z ##[section]Finishing: Run build
2020-01-27T21:36:34.2935680Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T21:36:34.2937556Z Task         : Get sources
2020-01-27T21:36:34.2937627Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-27T21:36:34.2937677Z Version      : 1.0.0
2020-01-27T21:36:34.2937722Z Author       : Microsoft
2020-01-27T21:36:34.2937722Z Author       : Microsoft
2020-01-27T21:36:34.2937787Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-27T21:36:34.2937840Z ==============================================================================
2020-01-27T21:36:34.6928652Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-27T21:36:34.6974333Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68558/merge to s
2020-01-27T21:36:34.7077373Z Cleaning up task key
2020-01-27T21:36:34.7078138Z Start cleaning up orphan processes.
2020-01-27T21:36:34.7204211Z Terminate orphan process: pid (3673) (python)
2020-01-27T21:36:34.7455418Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@HeroicKatora
Copy link
Contributor Author

That should now have a feature gate and appropriate tests.

@HeroicKatora HeroicKatora changed the title Add a method to query the capacity of a BufWriter Add a method to query the capacity of a BufWriter and BufReader Jan 28, 2020
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 4, 2020

📌 Commit aebd0d7 has been approved by alexcrichton

@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 Feb 4, 2020
@bors
Copy link
Contributor

bors commented Feb 4, 2020

⌛ Testing commit aebd0d7 with merge c9290dc...

bors added a commit that referenced this pull request Feb 4, 2020
Add a method to query the capacity of a BufWriter and BufReader

Besides the obvious of retrieving the parameter used to construct the writer, this method allows consumers to control the number of `flush` calls during write operations. For `BufReader` it gives an upper bound on the returned buffer in `fill_buf` which might influence the allocation behaviour of a consumer.
@JohnTitor
Copy link
Member

The unstable attribute's issue number should be tracking issue's, not PR's. Opened #68833, I'll submit a follow-up PR once this is merged.

@bors
Copy link
Contributor

bors commented Feb 4, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing c9290dc to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 4, 2020
@bors bors merged commit aebd0d7 into rust-lang:master Feb 4, 2020
@HeroicKatora HeroicKatora deleted the buf-writer-capacity branch February 5, 2020 06:36
Centril added a commit to Centril/rust that referenced this pull request Feb 5, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants