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

clarify types for rust/pull/44287 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

clarify types for rust/pull/44287 #4

wants to merge 1 commit into from

Conversation

Eh2406
Copy link

@Eh2406 Eh2406 commented Sep 16, 2017

If rust/pull/44287 lands then cargobomb tells us that this line will have a type ambiguity error, so this is a PR to preemptively prevent that. I couldn't figure why cargobomb thinks it will only have trouble with the one case so I did all the instances of that idiom.

Also you repo is hard to find from crates.io, can you add links to your toml?

Copy link

@marcelbuesing marcelbuesing left a comment

Choose a reason for hiding this comment

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

Alternative

// lib.rs
#![feature(type_ascription)]
// msg.rs
    /// Multipart message
    pub fn multipart(&mut self) -> &mut NlMsgHeader {
        self.flags |= Flags::Multi.into(): u16;
        self
    }
// ... same for all the others

Since type_ascriptions is not yet stable, I guess your approach is better.

@marcelbuesing
Copy link

@crhino would you mind merging @Eh2406 changes and releasing a new version ?

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