Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
gpestana committed Nov 21, 2024
1 parent 193c888 commit 39c1ed7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions substrate/frame/bags-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,11 @@ pub mod pallet {
#[pallet::weight(T::WeightInfo::rebag_non_terminal().max(T::WeightInfo::rebag_terminal()))]
pub fn rebag(origin: OriginFor<T>, dislocated: AccountIdLookupOf<T>) -> DispatchResult {
ensure_signed(origin)?;

ensure!(!T::PreserveOrder::get(), Error::<T, I>::MustPreserveOrder);

let dislocated = T::Lookup::lookup(dislocated)?;
let current_score = T::ScoreProvider::score(&dislocated);
Pallet::<T, I>::do_rebag(&dislocated, current_score)
let _ = Pallet::<T, I>::do_rebag(&dislocated, current_score)
.map_err::<Error<T, I>, _>(Into::into)?;
Ok(())
}
Expand All @@ -349,7 +348,6 @@ pub mod pallet {

let heavier = ensure_signed(origin)?;
let lighter = T::Lookup::lookup(lighter)?;

List::<T, I>::put_in_front_of(&lighter, &heavier)
.map_err::<Error<T, I>, _>(Into::into)
.map_err::<DispatchError, _>(Into::into)
Expand All @@ -370,7 +368,6 @@ pub mod pallet {
let _ = ensure_signed(origin)?;
let lighter = T::Lookup::lookup(lighter)?;
let heavier = T::Lookup::lookup(heavier)?;

List::<T, I>::put_in_front_of(&lighter, &heavier)
.map_err::<Error<T, I>, _>(Into::into)
.map_err::<DispatchError, _>(Into::into)
Expand Down

0 comments on commit 39c1ed7

Please sign in to comment.