Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
drop sse4, use_arc_str features
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander committed Jan 28, 2019
1 parent d9a1d7b commit 57aafae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 52,6 @@ server = ["buf_redux", "httparse", "quick-error", "safemem", "twoway"]
mock = []
nightly = []
bench = []
# Use this to enable SSE4.2 instructions in boundary finding
# TODO: Benchmark this
sse4 = ["nightly"]
# switch uses of `Arc<String>` for `Arc<str>` (`From<String>` impl only stabilized in 1.21)
use_arc_str = []

[[example]]
name = "hyper_client"
Expand Down
2 changes: 1 addition & 1 deletion src/server/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 114,7 @@ fn copy_headers<'h, 'b: 'h>(raw: &[Header<'b>], headers: &'h mut [StrHeader<'b>]
#[derive(Clone, Debug)]
pub struct FieldHeaders {
/// The field's name from the form.
pub name: ArcStr,
pub name: Arc<str>,

/// The filename of this entry, if supplied. This is not guaranteed to match the original file
/// or even to be a valid filename for the current platform.
Expand Down
14 changes: 0 additions & 14 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 30,6 @@ use self::save::SaveBuilder;

pub use self::save::{Entries, SaveResult, SavedField};

/// Default typedef for shared strings.
///
/// Enable the `use_arc_str` feature to use `Arc<str>` instead, which saves an indirection but
/// cannot be constructed in Rust versions older than 1.21 (the `From<String>` impl was stabilized
/// in that release).
#[cfg(not(feature = "use_arc_str"))]
pub type ArcStr = Arc<String>;

/// Optimized typedef for shared strings, replacing `Arc<String>`.
///
/// Enabled with the `use_arc_str` feature.
#[cfg(feature = "use_arc_str")]
pub type ArcStr = Arc<str>;

macro_rules! try_opt (
($expr:expr) => (
match $expr {
Expand Down

0 comments on commit 57aafae

Please sign in to comment.