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

Maintain compatibility with Rust 1.25 #137

Merged
merged 6 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ matrix:
- rust: nightly
script: *test_all

# Test everything on Rust 1.25.0 for backward compatibility
- rust: 1.25.0
script: *test_all

# Upload docs on nightly
- rust: nightly
script:
Expand Down
4 changes: 4 additions & 0 deletions src/symbolize/dbghelp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@

#![allow(bad_style)]

#[cfg(feature = "std")]
use std::char;

use core::mem;
use core::slice;
#[cfg(not(feature = "std"))]
Copy link
Member

Choose a reason for hiding this comment

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

Hm what's going on here? Was this something we moved from std to core in the last few versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeap, based on issue rust-lang/rust#49319 and the corresponding PR: rust-lang/rust#49698 which happened on 2018-04-12, which is just after Rust 1.26 was released.

use core::char;

use winapi::ctypes::*;
Expand Down
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ impl<'a> BytesOrWideString<'a> {
use self::BytesOrWideString::*;

match self {
Bytes(slice) => String::from_utf8_lossy(slice),
Wide(wide) => Cow::Owned(String::from_utf16_lossy(wide)),
&Bytes(slice) => String::from_utf8_lossy(slice),
&Wide(wide) => Cow::Owned(String::from_utf16_lossy(wide)),
}
}

Expand Down