Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test

- name: Test Release
uses: actions-rs/cargo@v1
with:
command: test
args: --release

- name: Test all benches
if: matrix.benches
Expand Down
13 changes: 6 additions & 7 deletions src/header/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ const HEADER_CHARS_H2: [u8; 256] = [
0, 0, 0, 0, 0, 0 // 25x
];

#[cfg(any(not(debug_assertions), not(target_arch = "wasm32")))]
#[cfg(not(debug_assertions))]
macro_rules! eq {
(($($cmp:expr,)*) $v:ident[$n:expr] ==) => {
$($cmp) && *
Expand All @@ -1055,10 +1055,9 @@ macro_rules! eq {
};
}

#[cfg(any(not(debug_assertions), not(target_arch = "wasm32")))]
/// This version is best under optimized mode, however in a wasm debug compile,
/// the `eq` macro expands to 1 + 1 + 1 + 1... and wasm explodes when this chain gets too long
/// See https://github.com/DenisKolodin/yew/issues/478
#[cfg(not(debug_assertions))]
/// This version is best under optimized mode, however it generates a lot of
/// code that adds ~1s to build times, so we only compile it for release builds.
fn parse_hdr<'a>(
data: &'a [u8],
b: &'a mut [u8; 64],
Expand Down Expand Up @@ -1518,8 +1517,8 @@ fn parse_hdr<'a>(
}
}

#[cfg(all(debug_assertions, target_arch = "wasm32"))]
/// This version works best in debug mode in wasm
#[cfg(debug_assertions)]
/// This version compiles faster for debug builds
fn parse_hdr<'a>(
data: &'a [u8],
b: &'a mut [u8; 64],
Expand Down