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

[beta] backports #81151

Merged
merged 24 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
59b6b11
Fix handling of malicious Readers in read_to_end
sfackler Jan 11, 2021
2fe7ddc
clean up control flow
sfackler Jan 11, 2021
e73125e
make check a bit more clear
sfackler Jan 11, 2021
2eef2e2
clarify docs a bit
sfackler Jan 11, 2021
44a1f09
bootstrap: extract from any compression algorithm during distcheck
pietroalbini Dec 30, 2020
4e4636d
bootstrap: never delete the tarball temporary directory
pietroalbini Dec 30, 2020
14fa726
bootstrap: change the dist outputs to GeneratedTarball
pietroalbini Dec 30, 2020
13cd768
bootstrap: use the correct paths during ./x.py install
pietroalbini Dec 30, 2020
4050e27
bootstrap: fix x.py install not working with relative prefix
pietroalbini Jan 7, 2021
96a00a9
Update mdbook
ehuss Jan 4, 2021
5a4852a
rustdoc: Render visibilities succinctly
camelid Dec 25, 2020
9c4494c
Fix bugs; fix and add tests
camelid Dec 25, 2020
2ea0fa5
Handle `pub(super)`
camelid Dec 25, 2020
76d2603
Prefer `pub(crate)` over no modifier
camelid Dec 26, 2020
c73576a
Merge `pub-restricted` and `visibility` test
camelid Dec 26, 2020
c7a85ca
Add missing code to `find_closest_parent_module`
camelid Dec 26, 2020
0c127b3
Simplify loop and remove old debugging code
camelid Dec 26, 2020
69e1722
Extract local variable
camelid Dec 26, 2020
e9ae18d
Update `find_nearest_parent_module`
camelid Dec 31, 2020
8f0ce5d
Remove FIXME
camelid Dec 31, 2020
dc7eb41
Small refactor
camelid Dec 31, 2020
0a3048d
Add note on panic behavior
camelid Dec 31, 2020
6ec4c71
Add FIXME for visibility of a module
camelid Dec 31, 2020
d239ea6
Add `@!has` checks to ensure private items don't have `pub`
camelid Dec 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1973,9 +1973,9 @@ dependencies = [

[[package]]
name = "mdbook"
version = "0.4.3"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29be448fcafb00c5a8966c4020c2a5ffbbc333e5b96d0bb5ef54b5bd0524d9ff"
checksum = "21251d3eb9ca5e8ac5b73384ddaa483a9bbc7d7dcd656b1fa8f266634810334a"
dependencies = [
"ammonia",
"anyhow",
Expand Down
22 changes: 10 additions & 12 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ where
{
let start_len = buf.len();
let mut g = Guard { len: buf.len(), buf };
let ret;
loop {
if g.len == g.buf.len() {
unsafe {
Expand All @@ -386,21 +385,20 @@ where
}
}

match r.read(&mut g.buf[g.len..]) {
Ok(0) => {
ret = Ok(g.len - start_len);
break;
let buf = &mut g.buf[g.len..];
match r.read(buf) {
Ok(0) => return Ok(g.len - start_len),
Ok(n) => {
// We can't allow bogus values from read. If it is too large, the returned vec could have its length
// set past its capacity, or if it overflows the vec could be shortened which could create an invalid
// string if this is called via read_to_string.
assert!(n <= buf.len());
g.len += n;
}
Ok(n) => g.len += n,
Err(ref e) if e.kind() == ErrorKind::Interrupted => {}
Err(e) => {
ret = Err(e);
break;
}
Err(e) => return Err(e),
}
}

ret
}

pub(crate) fn default_read_vectored<F>(read: F, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
Expand Down
Loading