Skip to content

Commit c9c4726

Browse files
committed
feat: bring back compatibility with Rust 1.11.0
Apparently code depended on regression in the stable rustc to work. Newest beta rustc (1.14) fixes the regression, so the code would no longer work. rust-lang/rust#37959
1 parent f904d1e commit c9c4726

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Current [API docs](https://zetok.github.io/tox) are a subject to changes.
2727
| libsodium | >=1.0.0 |
2828

2929
## Building
30-
Fairly simple. You'll need [Rust] >= 1.12.1 and [libsodium].
30+
Fairly simple. You'll need [Rust] >= 1.11.0 and [libsodium].
3131

3232
When you'll have deps, build debug version with
3333
```bash

src/toxcore/state_format/old.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,10 +1444,9 @@ fn friend_state_parse_bytes_test() {
14441444
let mut bytes = fs_bytes.clone();
14451445
// TODO: change to inclusive range (`...`) once gets stabilised
14461446
// rust #28237
1447-
for b in 5.. {
1447+
for b in 5..u8::max_value() {
14481448
bytes[0] = b;
14491449
assert_error(&bytes, &format!("Unknown FriendStatus: {}", b));
1450-
if b == u8::max_value() { break; }
14511450
}
14521451
}
14531452

@@ -1664,7 +1663,9 @@ fn section_data_parse_bytes_test() {
16641663
b_sect[4] = num;
16651664
wrong_skind(&b_sect);
16661665
}
1667-
for num in 12..255 {
1666+
// TODO: change to inclusive range (`...`) once gets stabilised
1667+
// rust #28237
1668+
for num in 12..u8::max_value() {
16681669
b_sect[4] = num;
16691670
wrong_skind(&b_sect);
16701671
}

0 commit comments

Comments
 (0)