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
Small modernization after MSRV bump #482
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ad0064d
Remove hex as a dev-dependency
elichai efe1a55
Use new inclusive range syntax
elichai 023fae1
Add the dyn keyword where appropriate
elichai 2d70623
Remove deprecated Error::description impl
elichai eda47c3
Remove redundant code / configurations
elichai File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -23,17 +23,9 @@ | |||||
//! software. | ||||||
//! | ||||||
|
||||||
#![crate_name = "bitcoin"] | ||||||
#![crate_type = "dylib"] | ||||||
#![crate_type = "rlib"] | ||||||
|
||||||
// Experimental features we need | ||||||
#![cfg_attr(all(test, feature = "unstable"), feature(test))] | ||||||
|
||||||
// Clippy whitelist | ||||||
#![cfg_attr(feature = "clippy", allow(needless_range_loop))] // suggests making a big mess of array newtypes | ||||||
#![cfg_attr(feature = "clippy", allow(extend_from_slice))] // `extend_from_slice` only available since 1.6 | ||||||
|
||||||
// Coding conventions | ||||||
#![forbid(unsafe_code)] | ||||||
#![deny(non_upper_case_globals)] | ||||||
|
@@ -44,23 +36,17 @@ | |||||
#![deny(unused_imports)] | ||||||
#![deny(missing_docs)] | ||||||
|
||||||
// In general, rust is absolutely horrid at supporting users doing things like, | ||||||
// for example, compiling Rust code for real environments. Disable useless lints | ||||||
// that don't do anything but annoy us and cant actually ever be resolved. | ||||||
#![allow(bare_trait_objects)] | ||||||
#![allow(ellipsis_inclusive_range_patterns)] | ||||||
|
||||||
// Re-exported dependencies. | ||||||
#[macro_use] pub extern crate bitcoin_hashes as hashes; | ||||||
pub extern crate secp256k1; | ||||||
pub extern crate bech32; | ||||||
|
||||||
#[cfg(feature="bitcoinconsensus")] extern crate bitcoinconsensus; | ||||||
#[cfg(feature = "serde")] extern crate serde; | ||||||
#[cfg(all(test, feature = "serde"))] #[macro_use] extern crate serde_derive; // for 1.22.0 compat | ||||||
#[cfg(all(test, feature = "serde"))] extern crate serde_json; | ||||||
#[cfg(all(test, feature = "serde"))] extern crate serde_test; | ||||||
#[cfg(all(test, feature = "unstable"))] extern crate test; | ||||||
#[cfg(feature="bitcoinconsensus")] extern crate bitcoinconsensus; | ||||||
|
||||||
#[cfg(target_pointer_width = "16")] | ||||||
compile_error!("rust-bitcoin cannot be used on 16-bit architectures"); | ||||||
|
@@ -75,8 +61,6 @@ pub mod network; | |||||
pub mod blockdata; | ||||||
pub mod util; | ||||||
pub mod consensus; | ||||||
// Do not remove: required in order to get hash types implementation macros to work correctly | ||||||
#[allow(unused_imports)] | ||||||
pub mod hash_types; | ||||||
|
||||||
pub use hash_types::*; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good as a part of this syntax PR to get rid of remaining
*
imports like this and specify all types explicitly