@@ -115,21 +115,22 @@ impl Scalar {
115115
116116 /// Returns a view of the scalar as a list scalar.
117117 ///
118- /// Note that we use [`ListScalar`] to represent **both** [`List`](crate::dtype::DType::List) and
119- /// [`FixedSizeList`](crate::dtype::DType::FixedSizeList).
118+ /// Note that we use [`ListScalar`] to represent **both** [`List`](crate::dtype::DType::List)
119+ /// and [`FixedSizeList`](crate::dtype::DType::FixedSizeList).
120120 ///
121121 /// # Panics
122122 ///
123- /// Panics if the scalar does not have a [`List`](crate::dtype::DType::List) or [`FixedSizeList`](crate::dtype::DType::FixedSizeList) type.
123+ /// Panics if the scalar does not have a [`List`](crate::dtype::DType::List) or
124+ /// [`FixedSizeList`](crate::dtype::DType::FixedSizeList) type.
124125 pub fn as_list ( & self ) -> ListScalar < ' _ > {
125126 self . as_list_opt ( )
126127 . vortex_expect ( "Failed to convert scalar to list" )
127128 }
128129
129130 /// Returns a view of the scalar as a list scalar if it has a list type.
130131 ///
131- /// Note that we use [`ListScalar`] to represent **both** [`List`](crate::dtype::DType::List) and
132- /// [`FixedSizeList`](crate::dtype::DType::FixedSizeList).
132+ /// Note that we use [`ListScalar`] to represent **both** [`List`](crate::dtype::DType::List)
133+ /// and [`FixedSizeList`](crate::dtype::DType::FixedSizeList).
133134 pub fn as_list_opt ( & self ) -> Option < ListScalar < ' _ > > {
134135 ListScalar :: try_new ( self . dtype ( ) , self . value ( ) ) . ok ( )
135136 }
@@ -172,7 +173,7 @@ impl Scalar {
172173}
173174
174175impl ScalarValue {
175- /// Returns the boolean value, panicking if the value is not a [`Bool`][ ScalarValue::Bool] .
176+ /// Returns the boolean value, panicking if the value is not a [`Bool`]( ScalarValue::Bool) .
176177 pub fn as_bool ( & self ) -> bool {
177178 match self {
178179 ScalarValue :: Bool ( b) => * b,
@@ -181,7 +182,7 @@ impl ScalarValue {
181182 }
182183
183184 /// Returns the primitive value, panicking if the value is not a
184- /// [`Primitive`][ ScalarValue::Primitive] .
185+ /// [`Primitive`]( ScalarValue::Primitive) .
185186 pub fn as_primitive ( & self ) -> & PValue {
186187 match self {
187188 ScalarValue :: Primitive ( p) => p,
@@ -190,39 +191,39 @@ impl ScalarValue {
190191 }
191192
192193 /// Returns the decimal value, panicking if the value is not a
193- /// [`Decimal`][ ScalarValue::Decimal] .
194+ /// [`Decimal`]( ScalarValue::Decimal) .
194195 pub fn as_decimal ( & self ) -> & DecimalValue {
195196 match self {
196197 ScalarValue :: Decimal ( d) => d,
197198 _ => vortex_panic ! ( "ScalarValue is not a Decimal" ) ,
198199 }
199200 }
200201
201- /// Returns the UTF-8 string value, panicking if the value is not a [`Utf8`][ ScalarValue::Utf8] .
202+ /// Returns the UTF-8 string value, panicking if the value is not a [`Utf8`]( ScalarValue::Utf8) .
202203 pub fn as_utf8 ( & self ) -> & BufferString {
203204 match self {
204205 ScalarValue :: Utf8 ( s) => s,
205206 _ => vortex_panic ! ( "ScalarValue is not a Utf8" ) ,
206207 }
207208 }
208209
209- /// Returns the binary value, panicking if the value is not a [`Binary`][ ScalarValue::Binary] .
210+ /// Returns the binary value, panicking if the value is not a [`Binary`]( ScalarValue::Binary) .
210211 pub fn as_binary ( & self ) -> & ByteBuffer {
211212 match self {
212213 ScalarValue :: Binary ( b) => b,
213214 _ => vortex_panic ! ( "ScalarValue is not a Binary" ) ,
214215 }
215216 }
216217
217- /// Returns the list elements, panicking if the value is not a [`List`][ ScalarValue::List] .
218+ /// Returns the tuple elements, panicking if the value is not a [`Tuple`]( ScalarValue::Tuple) .
218219 pub fn as_list ( & self ) -> & [ Option < ScalarValue > ] {
219220 match self {
220- ScalarValue :: List ( elements) => elements,
221- _ => vortex_panic ! ( "ScalarValue is not a List " ) ,
221+ ScalarValue :: Tuple ( elements) => elements,
222+ _ => vortex_panic ! ( "ScalarValue is not a Tuple " ) ,
222223 }
223224 }
224225
225- /// Returns the boolean value, panicking if the value is not a [`Bool`][ ScalarValue::Bool] .
226+ /// Returns the boolean value, panicking if the value is not a [`Bool`]( ScalarValue::Bool) .
226227 pub fn into_bool ( self ) -> bool {
227228 match self {
228229 ScalarValue :: Bool ( b) => b,
@@ -231,7 +232,7 @@ impl ScalarValue {
231232 }
232233
233234 /// Returns the primitive value, panicking if the value is not a
234- /// [`Primitive`][ ScalarValue::Primitive] .
235+ /// [`Primitive`]( ScalarValue::Primitive) .
235236 pub fn into_primitive ( self ) -> PValue {
236237 match self {
237238 ScalarValue :: Primitive ( p) => p,
@@ -240,35 +241,35 @@ impl ScalarValue {
240241 }
241242
242243 /// Returns the decimal value, panicking if the value is not a
243- /// [`Decimal`][ ScalarValue::Decimal] .
244+ /// [`Decimal`]( ScalarValue::Decimal) .
244245 pub fn into_decimal ( self ) -> DecimalValue {
245246 match self {
246247 ScalarValue :: Decimal ( d) => d,
247248 _ => vortex_panic ! ( "ScalarValue is not a Decimal" ) ,
248249 }
249250 }
250251
251- /// Returns the UTF-8 string value, panicking if the value is not a [`Utf8`][ ScalarValue::Utf8] .
252+ /// Returns the UTF-8 string value, panicking if the value is not a [`Utf8`]( ScalarValue::Utf8) .
252253 pub fn into_utf8 ( self ) -> BufferString {
253254 match self {
254255 ScalarValue :: Utf8 ( s) => s,
255256 _ => vortex_panic ! ( "ScalarValue is not a Utf8" ) ,
256257 }
257258 }
258259
259- /// Returns the binary value, panicking if the value is not a [`Binary`][ ScalarValue::Binary] .
260+ /// Returns the binary value, panicking if the value is not a [`Binary`]( ScalarValue::Binary) .
260261 pub fn into_binary ( self ) -> ByteBuffer {
261262 match self {
262263 ScalarValue :: Binary ( b) => b,
263264 _ => vortex_panic ! ( "ScalarValue is not a Binary" ) ,
264265 }
265266 }
266267
267- /// Returns the list elements, panicking if the value is not a [`List`][ ScalarValue::List] .
268+ /// Returns the tuple elements, panicking if the value is not a [`Tuple`]( ScalarValue::Tuple) .
268269 pub fn into_list ( self ) -> Vec < Option < ScalarValue > > {
269270 match self {
270- ScalarValue :: List ( elements) => elements,
271- _ => vortex_panic ! ( "ScalarValue is not a List " ) ,
271+ ScalarValue :: Tuple ( elements) => elements,
272+ _ => vortex_panic ! ( "ScalarValue is not a Tuple " ) ,
272273 }
273274 }
274275
0 commit comments