Skip to content

Commit 1843fa5

Browse files
Merge branch 'master' into mp/engine
2 parents dbbce46 + 5df2332 commit 1843fa5

File tree

4 files changed

+88
-50
lines changed

4 files changed

+88
-50
lines changed

.circleci/config.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
version: '2.1'
2+
3+
workflows:
4+
version: 2
5+
build:
6+
jobs:
7+
- build:
8+
matrix:
9+
parameters:
10+
rust_img: [
11+
# The default rust images (not -slim or -alpine) are based on buildpack-deps. Hopefully this will
12+
# be easier on the CI hosts since presumably those fat lower layers will already be cached, and
13+
# therefore faster than a minimal, customized alpine.
14+
# MSRV
15+
'rust:1.47.0',
16+
# stable
17+
'rust:latest',
18+
'rustlang/rust:nightly'
19+
# would be nice to have beta as well: https://github.com/rust-lang/docker-rust/issues/14
20+
]
21+
22+
jobs:
23+
build:
24+
parameters:
25+
rust_img:
26+
type: string
27+
docker:
28+
- image: << parameters.rust_img >>
29+
steps:
30+
- checkout
31+
- restore_cache:
32+
key: project-cache-v3-<< parameters.rust_img >>-{{ checksum "Cargo.toml" }}
33+
- run:
34+
name: Check formatting
35+
command: |
36+
rustup component add rustfmt
37+
cargo fmt -- --check
38+
- run:
39+
name: Add arm toolchain
40+
command: rustup target add thumbv6m-none-eabi
41+
- run:
42+
name: Build all targets
43+
command: cargo build --all-targets
44+
- run:
45+
name: Build without default features
46+
command: cargo build --no-default-features
47+
- run:
48+
name: Build with only alloc
49+
command: cargo build --no-default-features --features alloc
50+
- run:
51+
name: Build ARM without default features (no_std)
52+
command: cargo build --target thumbv6m-none-eabi --no-default-features
53+
- run:
54+
name: Build ARM with only alloc feature
55+
command: cargo build --target thumbv6m-none-eabi --no-default-features --features alloc
56+
- run:
57+
name: Run tests
58+
command: cargo test --verbose
59+
- run:
60+
name: Build docs
61+
command: cargo doc --verbose
62+
- run:
63+
name: Confirm a fuzzer can run
64+
# TERM=dumb prevents cargo fuzz list from printing with color
65+
environment:
66+
TERM: dumb
67+
command: |
68+
if [[ '<< parameters.rust_img >>' = 'rustlang/rust:nightly' ]]
69+
then
70+
cargo +nightly install cargo-fuzz
71+
cargo fuzz list | xargs -L 1 -I FUZZER cargo fuzz run FUZZER -- -max_total_time=1
72+
fi
73+
74+
- save_cache:
75+
key: project-cache-v3-<< parameters.rust_img >>-{{ checksum "Cargo.toml" }}
76+
paths:
77+
# rust docker img doesn't use $HOME/[.cargo,.rustup]
78+
- /usr/local/cargo
79+
- /usr/local/rustup
80+
- ./target

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

RELEASE-NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
- Standard base64 per the RFC is available via `DEFAULT_ENGINE`. To use different alphabets or other settings (padding, etc), create your own engine instance.
77
- `CharacterSet` is now `Alphabet` (per the RFC), and allows creating custom alphabets. The corresponding tables that were previously code-generated are now built dynamically.
88
- Since there are already multiple breaking changes, various functions are renamed to be more consistent and discoverable
9-
- DecoderReader now owns its delegate reader
109
- MSRV is now 1.47.0
10+
- DecoderReader now owns its inner reader, and can expose it via `into_inner()`. For symmetry, `EncoderWriter` can do the same with its writer.
1111

1212
# 0.13.0
1313

src/write/encoder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ const MIN_ENCODE_CHUNK_SIZE: usize = 3;
5555
///
5656
/// It has some minor performance loss compared to encoding slices (a couple percent).
5757
/// It does not do any heap allocation.
58+
///
59+
/// # Limitations
60+
///
61+
/// Owing to the specification of the `write` and `flush` methods on the `Write` trait and their
62+
/// implications for a buffering implementation, these methods may not behave as expected. In
63+
/// particular, calling `write_all` on this interface may fail with `io::ErrorKind::WriteZero`.
64+
/// See the documentation of the `Write` trait implementation for further details.
5865
pub struct EncoderWriter<'e, E: Engine, W: io::Write> {
5966
engine: &'e E,
6067
/// Where encoded data is written to. It's an Option as it's None immediately before Drop is

0 commit comments

Comments
 (0)