Skip to content

Commit

Permalink
Use lazy_static 1.2.0, remove twoway/pcmp and require rust 1.24.1+
Browse files Browse the repository at this point in the history
Before this patch, multipart got into an impossible sitation with
it's dependencies. It errs with:

```
error: failed to select a version for `lazy_static`.
    ... required by package `multipart v0.15.4`
versions that meet the requirements `>= 1.0, < 1.2.0` are: 1.1.0, 1.0.2, 1.0.1, 1.0.0

all possible versions conflict with previously selected packages.

  previously selected package `lazy_static v1.2.0`
    ... which is depended on by `ring v0.13.5`
    ... which is depended on by `cookie v0.11.0`
    ... which is depended on by `rocket_http v0.4.0`
    ... which is depended on by `rocket v0.4.0`
    ... which is depended on by `multipart v0.15.4
```

This is due to ring 0.13.3 bumping lazy_static to 1.2.0 to avoid
a [soundness bug](rust-lang-nursery/lazy-static.rs#117).
This patch fixes this problem by requiring at least rust 1.24.1.

In addition, I noticed that the feature sse4 was depending on
`twoway/pcmp`, but that has been [removed](bluss/twoway#8).
  • Loading branch information
erickt committed Jan 19, 2019
1 parent 5b9edb6 commit 8c238b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
except:
- fuzzing
rust:
- 1.22.1
- 1.24.1
- stable
- beta
- nightly
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ license = "MIT OR Apache-2.0"
readme = "README.md"

[dependencies]
# lazy-static (pulled in by e.g. nickel, regex) is incompatible with 1.22.1
lazy_static = { version = ">=1.0,<1.2.0", optional = true }
lazy_static = { version = "1.2.0", optional = true }
log = "0.4"
mime = "0.2"
mime_guess = "1.8"
Expand Down Expand Up @@ -55,7 +54,7 @@ nightly = []
bench = []
# Use this to enable SSE4.2 instructions in boundary finding
# TODO: Benchmark this
sse4 = ["nightly", "twoway/pcmp"]
sse4 = ["nightly"]
# switch uses of `Arc<String>` for `Arc<str>` (`From<String>` impl only stabilized in 1.21)
use_arc_str = []

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Client- and server-side abstractions for HTTP file uploads (POST requests with
Supports several different (**sync**hronous API) HTTP crates.
**Async**hronous (i.e. `futures`-based) API support will be provided by [multipart-async].

Minimum supported Rust version: 1.22.1
Minimum supported Rust version: 1.24.1

### [Documentation](http://docs.rs/multipart/)

Expand Down

0 comments on commit 8c238b3

Please sign in to comment.