Skip to content

Inline initiative  #8

@uselessgoddess

Description

@uselessgoddess

Add #[inline] attribute to relevant places

#[inline] – any obvious functions:

fn try_get_link(&self, index: T) -> Result<Link<T>, Error<T>> {
    self.get_link(index).ok_or(Error::NotExists(index))
}

#[inline(always)] – any hard delegations:

pub fn len(&self) -> usize {
    self.0.len()
}

#[cfg_attr(feature = "inline-more", inline)] – some questionable or rarely used or internal functions:

// from united/store.rs:194
fn is_unused(&self, link: T) -> bool {
   // impl . . . 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions