fn sort_by_distance<T: Into<Point2>>(self, target: T) -> IntoIter<Self::Item> {
		let mut v: Vec<_> = self.collect();
		let target = target.into();
		v.sort_by(dist_to(target));
		v.into_iter()
	}
/// Returns iterator of items sorted by distance to `target`.
///
/// This sort is stable (i.e., does not reorder equal elements) and `O(n * log(n))` worst-case.
///
/// When applicable, unstable sorting is preferred because it is generally faster than stable sorting
/// and it doesn't allocate auxiliary memory. See [`sort_unstable_by_distance`](Self::sort_unstable_by_distance).
Returns iterator of items sorted by distance to `target`.

When applicable, unstable sorting is preferred because it is generally faster than stable sorting
and it doesn't allocate auxiliary memory.
Returns iterator of items sorted by distance to ` target ` . When applicable unstable sorting is preferred because it is generally faster than stable sorting and it doesn ' t allocate auxiliary memory .
fn sort_by_distance<T: Into<Point2>>(self, target: T) -> IntoIter<Self::Item> {
		let mut v: Vec<_> = self.collect();
		let target = target.into();
		v.sort_by(dist_to(target));
		v.into_iter()
	}
fn sort_by_distance < T : Into < Point2 > > ( self , target : T ) -> IntoIter < Self :: Item > { let mut v : Vec < _ > = self . collect ( ) ; let target = target . into ( ) ; v . sort_by ( dist_to ( target ) ) ; v . into_iter ( ) }
Returns iterator of items sorted by distance to `target`.
Returns iterator of items sorted by distance to ` target ` .
self
target
T
self
target
T