@@ -444,94 +444,6 @@ impl SingleRowListArrayBuilder {
444444 }
445445}
446446
447- /// Wrap an array into a single element `ListArray`.
448- /// For example `[1, 2, 3]` would be converted into `[[1, 2, 3]]`
449- /// The field in the list array is nullable.
450- #[ deprecated(
451- since = "44.0.0" ,
452- note = "please use `SingleRowListArrayBuilder` instead"
453- ) ]
454- pub fn array_into_list_array_nullable ( arr : ArrayRef ) -> ListArray {
455- SingleRowListArrayBuilder :: new ( arr)
456- . with_nullable ( true )
457- . build_list_array ( )
458- }
459-
460- /// Wrap an array into a single element `ListArray`.
461- /// For example `[1, 2, 3]` would be converted into `[[1, 2, 3]]`
462- #[ deprecated(
463- since = "44.0.0" ,
464- note = "please use `SingleRowListArrayBuilder` instead"
465- ) ]
466- pub fn array_into_list_array ( arr : ArrayRef , nullable : bool ) -> ListArray {
467- SingleRowListArrayBuilder :: new ( arr)
468- . with_nullable ( nullable)
469- . build_list_array ( )
470- }
471-
472- #[ deprecated(
473- since = "44.0.0" ,
474- note = "please use `SingleRowListArrayBuilder` instead"
475- ) ]
476- pub fn array_into_list_array_with_field_name (
477- arr : ArrayRef ,
478- nullable : bool ,
479- field_name : & str ,
480- ) -> ListArray {
481- SingleRowListArrayBuilder :: new ( arr)
482- . with_nullable ( nullable)
483- . with_field_name ( Some ( field_name. to_string ( ) ) )
484- . build_list_array ( )
485- }
486-
487- /// Wrap an array into a single element `LargeListArray`.
488- /// For example `[1, 2, 3]` would be converted into `[[1, 2, 3]]`
489- #[ deprecated(
490- since = "44.0.0" ,
491- note = "please use `SingleRowListArrayBuilder` instead"
492- ) ]
493- pub fn array_into_large_list_array ( arr : ArrayRef ) -> LargeListArray {
494- SingleRowListArrayBuilder :: new ( arr) . build_large_list_array ( )
495- }
496-
497- #[ deprecated(
498- since = "44.0.0" ,
499- note = "please use `SingleRowListArrayBuilder` instead"
500- ) ]
501- pub fn array_into_large_list_array_with_field_name (
502- arr : ArrayRef ,
503- field_name : & str ,
504- ) -> LargeListArray {
505- SingleRowListArrayBuilder :: new ( arr)
506- . with_field_name ( Some ( field_name. to_string ( ) ) )
507- . build_large_list_array ( )
508- }
509-
510- #[ deprecated(
511- since = "44.0.0" ,
512- note = "please use `SingleRowListArrayBuilder` instead"
513- ) ]
514- pub fn array_into_fixed_size_list_array (
515- arr : ArrayRef ,
516- list_size : usize ,
517- ) -> FixedSizeListArray {
518- SingleRowListArrayBuilder :: new ( arr) . build_fixed_size_list_array ( list_size)
519- }
520-
521- #[ deprecated(
522- since = "44.0.0" ,
523- note = "please use `SingleRowListArrayBuilder` instead"
524- ) ]
525- pub fn array_into_fixed_size_list_array_with_field_name (
526- arr : ArrayRef ,
527- list_size : usize ,
528- field_name : & str ,
529- ) -> FixedSizeListArray {
530- SingleRowListArrayBuilder :: new ( arr)
531- . with_field_name ( Some ( field_name. to_string ( ) ) )
532- . build_fixed_size_list_array ( list_size)
533- }
534-
535447/// Wrap arrays into a single element `ListArray`.
536448///
537449/// Example:
@@ -832,21 +744,6 @@ pub fn set_difference<T: Borrow<usize>, S: Borrow<usize>>(
832744 . collect ( )
833745}
834746
835- /// Checks whether the given index sequence is monotonically non-decreasing.
836- #[ deprecated( since = "45.0.0" , note = "Use std::Iterator::is_sorted instead" ) ]
837- pub fn is_sorted < T : Borrow < usize > > ( sequence : impl IntoIterator < Item = T > ) -> bool {
838- // TODO: Remove this function when `is_sorted` graduates from Rust nightly.
839- let mut previous = 0 ;
840- for item in sequence. into_iter ( ) {
841- let current = * item. borrow ( ) ;
842- if current < previous {
843- return false ;
844- }
845- previous = current;
846- }
847- true
848- }
849-
850747/// Find indices of each element in `targets` inside `items`. If one of the
851748/// elements is absent in `items`, returns an error.
852749pub fn find_indices < T : PartialEq , S : Borrow < T > > (
@@ -1274,19 +1171,6 @@ mod tests {
12741171 assert_eq ! ( set_difference( [ 3 , 4 , 0 ] , [ 4 , 1 , 2 ] ) , vec![ 3 , 0 ] ) ;
12751172 }
12761173
1277- #[ test]
1278- #[ expect( deprecated) ]
1279- fn test_is_sorted ( ) {
1280- assert ! ( is_sorted:: <usize >( [ ] ) ) ;
1281- assert ! ( is_sorted( [ 0 ] ) ) ;
1282- assert ! ( is_sorted( [ 0 , 3 , 4 ] ) ) ;
1283- assert ! ( is_sorted( [ 0 , 1 , 2 ] ) ) ;
1284- assert ! ( is_sorted( [ 0 , 1 , 4 ] ) ) ;
1285- assert ! ( is_sorted( [ 0usize ; 0 ] ) ) ;
1286- assert ! ( is_sorted( [ 1 , 2 ] ) ) ;
1287- assert ! ( !is_sorted( [ 3 , 2 ] ) ) ;
1288- }
1289-
12901174 #[ test]
12911175 fn test_find_indices ( ) -> Result < ( ) > {
12921176 assert_eq ! ( find_indices( & [ 0 , 3 , 4 ] , [ 0 , 3 , 4 ] ) ?, vec![ 0 , 1 , 2 ] ) ;
0 commit comments