Add #[inline(always)] attribute to process methods in PlayerSettings and Track

This commit is contained in:
Anas Elgarhy 2023-02-21 05:10:25 +02:00
parent a82dc31beb
commit a867ee5fe2
No known key found for this signature in database
GPG key ID: 0501802A1D496528
2 changed files with 2 additions and 0 deletions

View file

@ -91,6 +91,7 @@ impl TemplateProcessor for Track {
/// Process the template with the track metadata.
/// The template is a string with placeholders that will be replaced with the track metadata.
/// The unknown placeholders will be skipped (don't replaced with anything, because they are maybe placeholders for player settings).
#[inline(always)]
fn process(&self, template: &String) -> String {
#[cfg(feature = "debug")]
{

View file

@ -41,6 +41,7 @@ impl TemplateProcessor for PlayerSettings {
/// Replace all keys in the template with the corresponding values.
/// If the key is unknown, it will be replaced with an empty string.
/// This function should be used after the track metadata placeholders have been replaced.
#[inline(always)]
fn process(&self, template: &String) -> String {
#[cfg(feature = "debug")]
{