pub fn into_assignment<P: PerThing>(self) -> Assignment<AccountId, P>
	where
		ExtendedBalance: From<InnerOf<P>>,
		AccountId: IdentifierT,
	{
		let stake = self.total();
		let distribution = self.distribution
			.into_iter()
			.filter_map(|(target, w)| {
				let per_thing = P::from_rational_approximation(w, stake);
				if per_thing == Bounded::min_value() {
					None
				} else {
					Some((target, per_thing))
				}
			})
			.collect::<Vec<(AccountId, P)>>();

		Assignment {
			who: self.who,
			distribution,
		}
	}
/// Converts self into the normal [`Assignment`] type.
///
/// If `fill` is set to true, it _tries_ to ensure that all the potential rounding errors are
/// compensated and the distribution's sum is exactly equal to 100%, by adding or subtracting
/// the remainder from the last distribution.
///
/// NOTE: it is quite critical that this attempt always works. The data type returned here will
/// potentially get used to create a compact type; a compact type requires sum of ratios to be
/// less than 100% upon un-compacting.
///
/// If an edge stake is so small that it cannot be represented in `T`, it is ignored. This edge
/// can never be re-created and does not mean anything useful anymore.
Converts self into the normal [`Assignment`] type.
If `fill` is set to true, it _tries_ to ensure that all the potential rounding errors are
compensated and the distribution's sum is exactly equal to 100%, by adding or subtracting
the remainder from the last distribution.

it is quite critical that this attempt always works. The data type returned here will
potentially get used to create a compact type; a compact type requires sum of ratios to be
less than 100% upon un-compacting.

If an edge stake is so small that it cannot be represented in `T`, it is ignored. This edge
can never be re-created and does not mean anything useful anymore.
Converts self into the normal [ ` Assignment ` ] type . If ` fill ` is set to true it _tries_ to ensure that all the potential rounding errors are compensated and the distribution ' s sum is exactly equal to 100% by adding or subtracting the remainder from the last distribution . it is quite critical that this attempt always works . The data type returned here will potentially get used to create a compact type ; a compact type requires sum of ratios to be less than 100% upon un - compacting . If an edge stake is so small that it cannot be represented in ` T ` it is ignored . This edge can never be re - created and does not mean anything useful anymore .
pub fn into_assignment<P: PerThing>(self) -> Assignment<AccountId, P>
	where
		ExtendedBalance: From<InnerOf<P>>,
		AccountId: IdentifierT,
	{
		let stake = self.total();
		let distribution = self.distribution
			.into_iter()
			.filter_map(|(target, w)| {
				let per_thing = P::from_rational_approximation(w, stake);
				if per_thing == Bounded::min_value() {
					None
				} else {
					Some((target, per_thing))
				}
			})
			.collect::<Vec<(AccountId, P)>>();
		Assignment {
			who: self.who,
			distribution,
		}
	}
pub fn into_assignment < P : PerThing > ( self ) -> Assignment < AccountId , P > where ExtendedBalance : From < InnerOf < P > > , AccountId : IdentifierT , { let stake = self . total ( ) ; let distribution = self . distribution . into_iter ( ) . filter_map ( | ( target , w ) | { let per_thing = P :: from_rational_approximation ( w , stake ) ; if per_thing == Bounded :: min_value ( ) { None } else { Some ( ( target , per_thing ) ) } } ) . collect :: < Vec < ( AccountId , P ) > > ( ) ; Assignment { who : self . who , distribution , } }
Converts self into the normal [`Assignment`] type.
Converts self into the normal [ ` Assignment ` ] type .
self
self