summaryrefslogtreecommitdiffstats
path: root/vendor/serde/src/ser/impls.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/serde/src/ser/impls.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/serde/src/ser/impls.rs')
-rw-r--r--vendor/serde/src/ser/impls.rs36
1 files changed, 35 insertions, 1 deletions
diff --git a/vendor/serde/src/ser/impls.rs b/vendor/serde/src/ser/impls.rs
index a79326e5c..9cafb3264 100644
--- a/vendor/serde/src/ser/impls.rs
+++ b/vendor/serde/src/ser/impls.rs
@@ -257,6 +257,23 @@ where
////////////////////////////////////////////////////////////////////////////////
+impl<Idx> Serialize for RangeFrom<Idx>
+where
+ Idx: Serialize,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ use super::SerializeStruct;
+ let mut state = try!(serializer.serialize_struct("RangeFrom", 1));
+ try!(state.serialize_field("start", &self.start));
+ state.end()
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
#[cfg(not(no_range_inclusive))]
impl<Idx> Serialize for RangeInclusive<Idx>
where
@@ -276,6 +293,23 @@ where
////////////////////////////////////////////////////////////////////////////////
+impl<Idx> Serialize for RangeTo<Idx>
+where
+ Idx: Serialize,
+{
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ use super::SerializeStruct;
+ let mut state = try!(serializer.serialize_struct("RangeTo", 1));
+ try!(state.serialize_field("end", &self.end));
+ state.end()
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
#[cfg(any(not(no_ops_bound), all(feature = "std", not(no_collections_bound))))]
impl<T> Serialize for Bound<T>
where
@@ -713,7 +747,7 @@ impl Serialize for net::IpAddr {
}
#[cfg(feature = "std")]
-const DEC_DIGITS_LUT: &'static [u8] = b"\
+const DEC_DIGITS_LUT: &[u8] = b"\
0001020304050607080910111213141516171819\
2021222324252627282930313233343536373839\
4041424344454647484950515253545556575859\