Repository: paritytech/substrate
File: frame/assets/src/lib.rs (Rust)

Code before:
		}

		/// Return the deposit (if any) of a target asset account. Useful if you are the depositor.
		///
		/// The origin must be Signed and either the account owner, depositor, or asset `Admin`. In
		/// order to burn a non-zero balance of the asset, the caller must be the account and should
		/// use `refund`.
		///
		/// - `id`: The identifier of the asset for the account holding a deposit.
		/// - `who`: The account to refund.
		///
		/// Emits `Refunded` event when successful.
		#[pallet::call_index(30)]
		#[pallet::weight(T::WeightInfo::refund_other())]
		pub fn refund_other(
			origin: OriginFor<T>,
			id: T::AssetIdParameter,
			who: T::AccountId,
		) -> DispatchResult {
			let origin = ensure_signed(origin)?;
			let id: T::AssetId = id.into();
			Self::do_refund_other(id, &who, &origin)
		}
	}

	/// Implements `AccountTouch` trait.
	/// Note that a depositor can be any account, without any specific privilege.
	/// This implementation is supposed to be used only for creation of system accounts.
	impl<T: Config<I>, I: 'static> AccountTouch<T::AssetId, T::AccountId> for Pallet<T, I> {
		type Balance = DepositBalanceOf<T, I>;

		fn deposit() -> Option<Self::Balance> {
			Some(T::AssetAccountDeposit::get())
		}

		fn touch(asset: T::AssetId, who: T::AccountId, depositor: T::AccountId) -> DispatchResult {
			Self::do_touch(asset, who, depositor, true)
		}
	}
}

sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);


Review comment (suggestion):
Please use proper links, in light of the 4th principle named [here](https://forum.parity.io/t/new-polkadot-substrate-documentation-plan/1810) (still working on writing a guideline for how to document FRAME code, but one is indeed using links where possible). 

Code after:
		}

		/// Return the deposit (if any) of a target asset account. Useful if you are the depositor.
		///
		/// The origin must be Signed and either the account owner, depositor, or asset `Admin`. In
		/// order to burn a non-zero balance of the asset, the caller must be the account and should
		/// use `refund`.
		///
		/// - `id`: The identifier of the asset for the account holding a deposit.
		/// - `who`: The account to refund.
		///
		/// Emits `Refunded` event when successful.
		#[pallet::call_index(30)]
		#[pallet::weight(T::WeightInfo::refund_other())]
		pub fn refund_other(
			origin: OriginFor<T>,
			id: T::AssetIdParameter,
			who: T::AccountId,
		) -> DispatchResult {
			let origin = ensure_signed(origin)?;
			let id: T::AssetId = id.into();
			Self::do_refund_other(id, &who, &origin)
		}
	}

	/// Implements [AccountTouch] trait.
	/// Note that a depositor can be any account, without any specific privilege.
	/// This implementation is supposed to be used only for creation of system accounts.
	impl<T: Config<I>, I: 'static> AccountTouch<T::AssetId, T::AccountId> for Pallet<T, I> {
		type Balance = DepositBalanceOf<T, I>;

		fn deposit_required() -> Self::Balance {
			T::AssetAccountDeposit::get()
		}

		fn touch(asset: T::AssetId, who: T::AccountId, depositor: T::AccountId) -> DispatchResult {
			Self::do_touch(asset, who, depositor, true)
		}
	}
}

sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);