parent
1209c3675b
commit
40560e99e4
@ -1 +1,2 @@
|
||||
/rmp-0.8.7.crate
|
||||
/rmp-0.8.8.crate
|
||||
|
@ -1,101 +0,0 @@
|
||||
From e96d118f7b915ff65e6c14dcccdecffb664f94ab Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Safronov <division494@gmail.com>
|
||||
Date: Mon, 22 Jan 2018 22:08:00 +0300
|
||||
Subject: [PATCH] fix: weaken cursor restrictions in tests (#158)
|
||||
|
||||
Related to https://github.com/rust-lang/rust/issues/47640.
|
||||
---
|
||||
rmp/src/decode/str.rs | 2 +-
|
||||
rmp/tests/func/decode/array.rs | 4 ++--
|
||||
rmp/tests/func/decode/sint.rs | 6 +++---
|
||||
rmp/tests/func/decode/string.rs | 4 ++--
|
||||
4 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/rmp/src/decode/str.rs b/rmp/src/decode/str.rs
|
||||
index cc92659..4041f1c 100644
|
||||
--- a/rmp/src/decode/str.rs
|
||||
+++ b/rmp/src/decode/str.rs
|
||||
@@ -107,7 +107,7 @@ fn read_str_len_with_nread<R>(rd: &mut R) -> Result<(u32, usize), ValueReadError
|
||||
///
|
||||
/// This function is **unstable**, because it needs review.
|
||||
// TODO: Stabilize. Mark error values for each error case (in docs).
|
||||
-pub fn read_str<'r, R>(rd: &mut R, mut buf: &'r mut [u8]) -> Result<&'r str, DecodeStringError<'r>>
|
||||
+pub fn read_str<'r, R>(rd: &mut R, buf: &'r mut [u8]) -> Result<&'r str, DecodeStringError<'r>>
|
||||
where R: Read
|
||||
{
|
||||
let len = try!(read_str_len(rd));
|
||||
diff --git a/rmp/tests/func/decode/array.rs b/rmp/tests/func/decode/array.rs
|
||||
index 70492e1..1174642 100644
|
||||
--- a/rmp/tests/func/decode/array.rs
|
||||
+++ b/rmp/tests/func/decode/array.rs
|
||||
@@ -48,7 +48,7 @@ fn from_array16_unexpected_eof_read_size() {
|
||||
let mut cur = Cursor::new(buf);
|
||||
|
||||
read_array_len(&mut cur).err().unwrap();
|
||||
- assert_eq!(2, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -75,7 +75,7 @@ fn from_array32_unexpected_eof_read_size() {
|
||||
let mut cur = Cursor::new(buf);
|
||||
|
||||
read_array_len(&mut cur).err().unwrap();
|
||||
- assert_eq!(4, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
diff --git a/rmp/tests/func/decode/sint.rs b/rmp/tests/func/decode/sint.rs
|
||||
index ba19548..ddf46ce 100644
|
||||
--- a/rmp/tests/func/decode/sint.rs
|
||||
+++ b/rmp/tests/func/decode/sint.rs
|
||||
@@ -108,7 +108,7 @@ fn from_i16_unexpected_eof() {
|
||||
let mut cur = Cursor::new(&buf[..]);
|
||||
|
||||
read_i16(&mut cur).err().unwrap();
|
||||
- assert_eq!(2, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -147,7 +147,7 @@ fn from_i32_unexpected_eof() {
|
||||
let mut cur = Cursor::new(&buf[..]);
|
||||
|
||||
read_i32(&mut cur).err().unwrap();
|
||||
- assert_eq!(4, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -186,7 +186,7 @@ fn from_i64_unexpected_eof() {
|
||||
let mut cur = Cursor::new(&buf[..]);
|
||||
|
||||
read_i64(&mut cur).err().unwrap();
|
||||
- assert_eq!(8, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
diff --git a/rmp/tests/func/decode/string.rs b/rmp/tests/func/decode/string.rs
|
||||
index 1175141..6f6dd83 100644
|
||||
--- a/rmp/tests/func/decode/string.rs
|
||||
+++ b/rmp/tests/func/decode/string.rs
|
||||
@@ -90,7 +90,7 @@ fn from_str16_read_str_len_eof() {
|
||||
let mut cur = Cursor::new(buf);
|
||||
|
||||
read_str_len(&mut cur).err().unwrap();
|
||||
- assert_eq!(2, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -117,7 +117,7 @@ fn from_str32_read_str_len_eof() {
|
||||
let mut cur = Cursor::new(buf);
|
||||
|
||||
read_str_len(&mut cur).err().unwrap();
|
||||
- assert_eq!(4, cur.position());
|
||||
+ assert!(cur.position() >= 1);
|
||||
}
|
||||
|
||||
#[test]
|
@ -1,11 +0,0 @@
|
||||
--- rmp-0.8.7/Cargo.toml 1970-01-01T00:00:00+00:00
|
||||
+++ rmp-0.8.7/Cargo.toml 2019-07-21T08:08:59.044773+00:00
|
||||
@@ -25,6 +25,6 @@
|
||||
version = "1"
|
||||
|
||||
[dependencies.num-traits]
|
||||
-version = "0.1"
|
||||
+version = "0.2"
|
||||
[dev-dependencies.quickcheck]
|
||||
-version = "0.3"
|
||||
+version = "0.8"
|
@ -1 +1 @@
|
||||
SHA512 (rmp-0.8.7.crate) = e679e45d6864c7a31835941ed919aea27a591bbd0a7902b4b125556cce25d2e840c7b1dbfcc1708af71680011d33064b157b36f7b9eb8c7cd3ca1448d88ce8bb
|
||||
SHA512 (rmp-0.8.8.crate) = 743f285a754ae5ec1e4a2d8f9c5d745576fe318bf091ed8966803163615eaf00a8c4f19ce36a8ab726bd6c691baecf082f4c6365b3679d1a04d2194874bd994e
|
||||
|
Loading…
Reference in new issue