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

Upgrade to Rust nightly #12

Closed
ArtemGr opened this issue Jan 15, 2015 · 7 comments
Closed

Upgrade to Rust nightly #12

ArtemGr opened this issue Jan 15, 2015 · 7 comments

Comments

@ArtemGr
Copy link
Contributor

ArtemGr commented Jan 15, 2015

Rust-smtp fails to compile on the fresh Rust nightly.
I did a quick upgrade: https://github.com/ArtemGr/rust-smtp/commit/f7e205e637eb31bc295849b561153abda9e5b247
Not creating a pull request because you might want to fix things differently.

@schickling
Copy link

I'm just curious: Why are you rewriting every to_string() with the format! macro? Is this considered to be a best practice?

@ArtemGr
Copy link
Contributor Author

ArtemGr commented Jan 21, 2015

The reason I did it was because to_string() no longer wanted to compile. Maybe it was some kind of glitch and it works again, or maybe it was just removed from Prelude and should have been imported explicitly.

And yes, AFAIK, format! is the way to go.
to_string() is implemented as (a variation of) format! - http://doc.rust-lang.org/src/collections/string.rs.html#937-946

@schickling
Copy link

Thanks for that information @ArtemGr

@ArtemGr
Copy link
Contributor Author

ArtemGr commented Feb 14, 2015

NB, for strings format! is temporarily slower than String::from_str, rust-lang/rust#20400

@ArtemGr
Copy link
Contributor Author

ArtemGr commented Feb 27, 2015

@ArtemGr ArtemGr changed the title Upgrade to Rust nightly (1.0 Alpha) Upgrade to Rust nightly Feb 27, 2015
@amousset
Copy link
Member

Merged, thank you. I am updating the tests.

@ArtemGr
Copy link
Contributor Author

ArtemGr commented Feb 27, 2015

Cool! )

BTW, I'm not sure if the features vector will be formatted correctly, had to use the {:?} as a quick fix because it wouldn't format with {} for some reason.

@amousset amousset closed this as completed Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants