Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some clippy warnings #43

Merged
merged 1 commit into from
Oct 8, 2018
Merged

fix some clippy warnings #43

merged 1 commit into from
Oct 8, 2018

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Oct 1, 2018

No description provided.

Copy link
Owner

@m4b m4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo question about inline; thanks for the PR @llogiq !

}

/// Reads `Self` from `This` using the context `Ctx`; must _not_ fail
pub trait FromCtx<Ctx: Copy = (), This: ?Sized = [u8]> {
#[inline]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for removing inline annotation here? Does it have no effect when it's on the trait def? (I've always wondered actually).

Otherwise, we def should have inline, as perf goes down pretty significantly without it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline annotations are only effective on impls.

@m4b
Copy link
Owner

m4b commented Oct 8, 2018

Awesome good to know, thanks for this !

@m4b m4b merged commit 426f322 into m4b:master Oct 8, 2018
@llogiq llogiq deleted the clippy branch October 9, 2018 10:26
@llogiq
Copy link
Contributor Author

llogiq commented Oct 9, 2018

You're welcome.

willglynn pushed a commit to willglynn/scroll that referenced this pull request Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants