Skip to content

Commit 708de94

Browse files
committed
Remove deprecated Zip apply methods
- apply -> for_each - apply_collect -> map_collect - apply_assign_into -> map_assign_into - par_apply -> par_for_each - par_apply_collect -> par_map_collect - par_apply_assign_into -> par_map_assign_into
1 parent 41090f3 commit 708de94

File tree

2 files changed

+0
-71
lines changed

2 files changed

+0
-71
lines changed

src/parallel/impl_par_methods.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,6 @@ macro_rules! zip_impl {
7070
self.into_par_iter().for_each(move |($($p,)*)| function($($p),*))
7171
}
7272

73-
/// The `par_apply` method for `Zip`.
74-
///
75-
/// This is a shorthand for using `.into_par_iter().for_each()` on
76-
/// `Zip`.
77-
///
78-
/// Requires crate feature `rayon`.
79-
#[deprecated(note="Renamed to .par_for_each()", since="0.15.0")]
80-
pub fn par_apply<F>(self, function: F)
81-
where F: Fn($($p::Item),*) + Sync + Send
82-
{
83-
self.into_par_iter().for_each(move |($($p,)*)| function($($p),*))
84-
}
85-
8673
expand_if!(@bool [$notlast]
8774

8875
/// Map and collect the results into a new array, which has the same size as the
@@ -134,18 +121,6 @@ macro_rules! zip_impl {
134121
}
135122
}
136123

137-
/// Map and collect the results into a new array, which has the same size as the
138-
/// inputs.
139-
///
140-
/// If all inputs are c- or f-order respectively, that is preserved in the output.
141-
#[deprecated(note="Renamed to .par_map_collect()", since="0.15.0")]
142-
pub fn par_apply_collect<R>(self, f: impl Fn($($p::Item,)* ) -> R + Sync + Send)
143-
-> Array<R, D>
144-
where R: Send
145-
{
146-
self.par_map_collect(f)
147-
}
148-
149124
/// Map and assign the results into the producer `into`, which should have the same
150125
/// size as the other inputs.
151126
///
@@ -162,20 +137,6 @@ macro_rules! zip_impl {
162137
});
163138
}
164139

165-
/// Apply and assign the results into the producer `into`, which should have the same
166-
/// size as the other inputs.
167-
///
168-
/// The producer should have assignable items as dictated by the `AssignElem` trait,
169-
/// for example `&mut R`.
170-
#[deprecated(note="Renamed to .par_map_assign_into()", since="0.15.0")]
171-
pub fn par_apply_assign_into<R, Q>(self, into: Q, f: impl Fn($($p::Item,)* ) -> R + Sync + Send)
172-
where Q: IntoNdProducer<Dim=D>,
173-
Q::Item: AssignElem<R> + Send,
174-
Q::Output: Send,
175-
{
176-
self.par_map_assign_into(into, f)
177-
}
178-
179140
/// Parallel version of `fold`.
180141
///
181142
/// Splits the producer in multiple tasks which each accumulate a single value

src/zip/mod.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -586,15 +586,6 @@ macro_rules! map_impl {
586586
});
587587
}
588588

589-
/// Apply a function to all elements of the input arrays,
590-
/// visiting elements in lock step.
591-
#[deprecated(note="Renamed to .for_each()", since="0.15.0")]
592-
pub fn apply<F>(self, function: F)
593-
where F: FnMut($($p::Item),*)
594-
{
595-
self.for_each(function)
596-
}
597-
598589
/// Apply a fold function to all elements of the input arrays,
599590
/// visiting elements in lock step.
600591
///
@@ -791,15 +782,6 @@ macro_rules! map_impl {
791782
}
792783
}
793784

794-
/// Map and collect the results into a new array, which has the same size as the
795-
/// inputs.
796-
///
797-
/// If all inputs are c- or f-order respectively, that is preserved in the output.
798-
#[deprecated(note="Renamed to .map_collect()", since="0.15.0")]
799-
pub fn apply_collect<R>(self, f: impl FnMut($($p::Item,)* ) -> R) -> Array<R, D> {
800-
self.map_collect(f)
801-
}
802-
803785
/// Map and assign the results into the producer `into`, which should have the same
804786
/// size as the other inputs.
805787
///
@@ -815,20 +797,6 @@ macro_rules! map_impl {
815797
});
816798
}
817799

818-
/// Map and assign the results into the producer `into`, which should have the same
819-
/// size as the other inputs.
820-
///
821-
/// The producer should have assignable items as dictated by the `AssignElem` trait,
822-
/// for example `&mut R`.
823-
#[deprecated(note="Renamed to .map_assign_into()", since="0.15.0")]
824-
pub fn apply_assign_into<R, Q>(self, into: Q, f: impl FnMut($($p::Item,)* ) -> R)
825-
where Q: IntoNdProducer<Dim=D>,
826-
Q::Item: AssignElem<R>
827-
{
828-
self.map_assign_into(into, f)
829-
}
830-
831-
832800
);
833801

834802
/// Split the `Zip` evenly in two.

0 commit comments

Comments
 (0)