tustvold commented on code in PR #5206:
URL: https://github.com/apache/arrow-rs/pull/5206#discussion_r1430032601
##########
object_store/src/util.rs:
##########
@@ -167,6 +172,116 @@ fn merge_ranges(ranges: &[std::ops::Range<usize>],
coalesce: usize) -> Vec<std::
ret
}
+// Fully-featured HttpRange etc. implementation here
https://github.com/clbarnes/arrow-rs/blob/httpsuff/object_store/src/util.rs
+
+/// A single range in a `Range` request.
+///
+/// These can be created from [usize] ranges, like
+///
+/// ```rust
+/// let range1: HttpRange = (50..150).into();
+/// let range2: HttpRange = (50..=150).into();
+/// let range3: HttpRange = (50..).into();
+/// let range4: HttpRange = (..150).into();
+/// ```
+///
+/// At present, this is only used internally.
+#[derive(Debug, PartialEq, Eq, Clone, Copy)]
+pub(crate) enum HttpRange {
+ /// A range with a given first and last bytes.
+ /// If `last > first`, the response should be empty.
+ Range {
Review Comment:
Yeah IIRC this is just because it created a confusing situation when using
Range as an iterator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]