Skip to content

Commit e4ce997

Browse files
committed
subtle-encoding: Use new inclusive range syntax
The old syntax is causing build failures on 1.37: https://ci.appveyor.com/project/tony-iqlusion/crates/builds/26780395/job/9jgvr9rye0q6mlok
1 parent 00903dc commit e4ce997

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ branches:
77

88
rust:
99
- 1.36.0 # Minimum supported
10-
# - stable # Stable should always be supported (but hasn't been bumped to 1.36)
10+
- stable # Stable should always work too
1111

12-
os:
13-
- linux
14-
- osx
15-
- windows
12+
os: linux
1613

1714
matrix:
1815
fast_finish: true
@@ -22,6 +19,13 @@ matrix:
2219
# improvements to Travis Windows support
2320
- os: windows
2421
include:
22+
# Travis hasn't bumped `stable` on macOS to 1.36 yet =(
23+
- name: "Rust: 1.36"
24+
os: osx
25+
rust: 1.36.0
26+
- name: "Rust: 1.36"
27+
os: windows
28+
rust: 1.36.0
2529
- name: "Rust: stable (wasm32)"
2630
rust: stable
2731
script:

subtle-encoding/src/bech32/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl Bech32 {
109109
// Check separator validity
110110
match separator {
111111
'1' | 'B' | 'I' | 'O' | 'b' | 'i' | 'o' => (),
112-
'0'...'9' | 'A'...'Z' | 'a'...'z' => panic!("invalid separator: {:?}", separator),
112+
'0'..='9' | 'A'..='Z' | 'a'..='z' => panic!("invalid separator: {:?}", separator),
113113
_ => (),
114114
}
115115

@@ -200,7 +200,7 @@ impl Bech32 {
200200
// Ensure all characters in the human readable part are in a valid range
201201
for c in hrp.chars() {
202202
match c {
203-
'!'...'@' | 'A'...'Z' | '['...'`' | 'a'...'z' | '{'...'~' => (),
203+
'!'..='@' | 'A'..='Z' | '['..='`' | 'a'..='z' | '{'..='~' => (),
204204
_ => return Err(EncodingInvalid),
205205
}
206206
}

0 commit comments

Comments
 (0)