Skip to content

Commit f1c4df0

Browse files
feat: make AlignmentOperation hashable
1 parent 54623dc commit f1c4df0

File tree

2 files changed

+9
-22
lines changed

2 files changed

+9
-22
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
toolchain: stable
2020
override: true
2121
components: rustfmt
22+
23+
- uses: Swatinem/rust-cache@v1.3.0
2224

2325
- name: Check format
2426
run: cargo fmt -- --check
@@ -35,6 +37,8 @@ jobs:
3537
toolchain: stable
3638
override: true
3739
components: clippy
40+
41+
- uses: Swatinem/rust-cache@v1.3.0
3842

3943
- name: Lint with clippy
4044
uses: actions-rs/clippy-check@v1
@@ -62,24 +66,13 @@ jobs:
6266
- name: Checkout repository
6367
uses: actions/checkout@v2
6468

65-
- uses: actions/cache@v2
66-
with:
67-
path: |
68-
~/.cargo/registry
69-
~/.cargo/git
70-
target
71-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
72-
73-
- uses: actions-rs/toolchain@v1
74-
with:
75-
toolchain: ${{ matrix.rust }}
76-
override: true
77-
7869
- name: Install ${{ matrix.rust }} toolchain
7970
uses: actions-rs/toolchain@v1
8071
with:
8172
toolchain: ${{ matrix.rust }}
8273
override: true
74+
75+
- uses: Swatinem/rust-cache@v1.3.0
8376

8477
- name: Run tests
8578
uses: actions-rs/cargo@v1
@@ -94,19 +87,13 @@ jobs:
9487
- name: Checkout repository
9588
uses: actions/checkout@v2
9689

97-
- uses: actions/cache@v2
98-
with:
99-
path: |
100-
~/.cargo/registry
101-
~/.cargo/git
102-
target
103-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
104-
10590
- name: Install nightly toolchain
10691
uses: actions-rs/toolchain@v1
10792
with:
10893
toolchain: stable
10994
override: true
95+
96+
- uses: Swatinem/rust-cache@v1.3.0
11097

11198
- name: Install cargo-tarpaulin
11299
uses: actions-rs/install@v0.1

src/alignment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub type TextSlice<'a> = &'a [u8];
1919
/// of standard modes like Global, Semi-Global and Local alignment, the clip operations
2020
/// are filtered out
2121
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22-
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
22+
#[derive(Eq, PartialEq, Debug, Copy, Clone, Hash)]
2323
pub enum AlignmentOperation {
2424
Match,
2525
Subst,

0 commit comments

Comments
 (0)