| { | ||
| "git": { | ||
| "sha1": "de55623f76f01dc9db4ca0f98966299b41146d6d" | ||
| "sha1": "b669472014bd90751fe542d6ac4d3b776129adf5" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+1
-1
@@ -7,3 +7,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "bstr" | ||
| version = "1.11.1" | ||
| version = "1.11.2" | ||
| dependencies = [ | ||
@@ -10,0 +10,0 @@ "memchr", |
+1
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "bstr" | ||
| version = "1.11.1" | ||
| version = "1.11.2" | ||
| authors = ["Andrew Gallant <jamslam@gmail.com>"] | ||
@@ -19,0 +19,0 @@ build = false |
+19
-22
| macro_rules! impl_partial_eq { | ||
| ($lhs:ty, $rhs:ty) => { | ||
| impl<'a, 'b> PartialEq<$rhs> for $lhs { | ||
| impl<'a> PartialEq<$rhs> for $lhs { | ||
| #[inline] | ||
@@ -11,3 +11,3 @@ fn eq(&self, other: &$rhs) -> bool { | ||
| impl<'a, 'b> PartialEq<$lhs> for $rhs { | ||
| impl<'a> PartialEq<$lhs> for $rhs { | ||
| #[inline] | ||
@@ -24,3 +24,3 @@ fn eq(&self, other: &$lhs) -> bool { | ||
| ($lhs:ty, $rhs:ty) => { | ||
| impl<'a, 'b, const N: usize> PartialEq<$rhs> for $lhs { | ||
| impl<'a, const N: usize> PartialEq<$rhs> for $lhs { | ||
| #[inline] | ||
@@ -33,3 +33,3 @@ fn eq(&self, other: &$rhs) -> bool { | ||
| impl<'a, 'b, const N: usize> PartialEq<$lhs> for $rhs { | ||
| impl<'a, const N: usize> PartialEq<$lhs> for $rhs { | ||
| #[inline] | ||
@@ -47,3 +47,3 @@ fn eq(&self, other: &$lhs) -> bool { | ||
| ($lhs:ty, $rhs:ty) => { | ||
| impl<'a, 'b> PartialEq<$rhs> for $lhs { | ||
| impl<'a> PartialEq<$rhs> for $lhs { | ||
| #[inline] | ||
@@ -56,3 +56,3 @@ fn eq(&self, other: &$rhs) -> bool { | ||
| impl<'a, 'b> PartialEq<$lhs> for $rhs { | ||
| impl<'a> PartialEq<$lhs> for $rhs { | ||
| #[inline] | ||
@@ -69,3 +69,3 @@ fn eq(&self, other: &$lhs) -> bool { | ||
| ($lhs:ty, $rhs:ty) => { | ||
| impl<'a, 'b> PartialOrd<$rhs> for $lhs { | ||
| impl<'a> PartialOrd<$rhs> for $lhs { | ||
| #[inline] | ||
@@ -78,3 +78,3 @@ fn partial_cmp(&self, other: &$rhs) -> Option<Ordering> { | ||
| impl<'a, 'b> PartialOrd<$lhs> for $rhs { | ||
| impl<'a> PartialOrd<$lhs> for $rhs { | ||
| #[inline] | ||
@@ -91,3 +91,3 @@ fn partial_cmp(&self, other: &$lhs) -> Option<Ordering> { | ||
| ($lhs:ty, $rhs:ty) => { | ||
| impl<'a, 'b, const N: usize> PartialOrd<$rhs> for $lhs { | ||
| impl<'a, const N: usize> PartialOrd<$rhs> for $lhs { | ||
| #[inline] | ||
@@ -100,3 +100,3 @@ fn partial_cmp(&self, other: &$rhs) -> Option<Ordering> { | ||
| impl<'a, 'b, const N: usize> PartialOrd<$lhs> for $rhs { | ||
| impl<'a, const N: usize> PartialOrd<$lhs> for $rhs { | ||
| #[inline] | ||
@@ -537,2 +537,5 @@ fn partial_cmp(&self, other: &$lhs) -> Option<Ordering> { | ||
| '\0' => write!(f, "\\0")?, | ||
| '\x01'..='\x7f' => { | ||
| write!(f, "{}", (ch as u8).escape_ascii())?; | ||
| } | ||
| '\u{FFFD}' => { | ||
@@ -548,13 +551,2 @@ let bytes = self[s..e].as_bytes(); | ||
| } | ||
| // ASCII control characters except \0, \n, \r, \t | ||
| '\x01'..='\x08' | ||
| | '\x0b' | ||
| | '\x0c' | ||
| | '\x0e'..='\x19' | ||
| | '\x7f' => { | ||
| write!(f, "\\x{:02x}", ch as u32)?; | ||
| } | ||
| '\n' | '\r' | '\t' => { | ||
| write!(f, "{}", ch.escape_debug())?; | ||
| } | ||
| _ => { | ||
@@ -1319,3 +1311,8 @@ write!(f, "{}", ch.escape_debug())?; | ||
| B(&format!("{:?}", b"\xed\xa0\x80Aa\x7f\x0b".as_bstr())).as_bstr(), | ||
| ) | ||
| ); | ||
| assert_eq!( | ||
| r#""\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x11\x12\r\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f \x7f\x80\x81\xfe\xff""#, | ||
| format!("{:?}", b"\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x11\x12\r\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f \x7f\x80\x81\xfe\xff".as_bstr()), | ||
| ); | ||
| } | ||
@@ -1322,0 +1319,0 @@ |
Sorry, the diff of this file is not supported yet