-
Notifications
You must be signed in to change notification settings - Fork 989
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
Rust 1.80+ fixes & accumulated warning cleanup #3796
Conversation
chain/tests/chain_test_helper.rs
Outdated
@@ -11,6 +11,7 @@ | |||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
#![allow(dead_code)] |
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.
What is that needed for?
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.
there's some cargo oddness that's causing a 'not used' warning for the clean_output_dir
function below during compilation, even though it's configured as test only. I spent some time trying to track it down and couldn't find a reason for it. I could possibly spend more time on it
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.
Maybe ask around on IRC #rust or other rust forums if other people have run into that issue. I see that googling for
rust 'not used' warning for test code
also brings up discussions on stack overflow, reddit, and the Rust programming language forum...
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.
Looks fine to me. Just would prefer not to see ignore dead code directive...
Just moved the directive to be function-scope rather than module scope, which it should have been in the first place. |
* Update grin_secp to 0.7.14 (#3788) * Update versioning on master to 5.4.0-alpha.0 * Update versioning on master to 5.4.0-alpha.0 (#3789) * Remove Merkle Proof Generation from Foreign API `get_outputs` (#3792) * Update versioning on master to 5.4.0-alpha.0 * Remove merkle proof generation from foreign API * Rust 1.80+ fixes & accumulated warning cleanup (#3796) * Update versioning on master to 5.4.0-alpha.0 * updates for 1.80 and other accumulated warnings * further warning cleanups * move dead code tag to function defn rather than module * Chain type field (#3790) * Adding chain type field into get_status rpc * formatting * update version for next build --------- Co-authored-by: aglkm <[email protected]>
Fix for current build issues on rust 1.8+, as well as fixes for all warnings and future deprecation warnings. Touches core code (though not in any complex way) so needs another level of review.
time
deps) to 0.21edge_bits
field inCuckooParams
structRPCError
NaiveDateTime::from_timestamp_opt
replaced withDateTime::from_timestamp ... .naive_utc()
NaiveDateTime::timestamp()
replaced with.and_utc().timestamp()
timestamp_nanos()
->timestamp_nanos_opt()
clean_output_dir()
inchain/tests/common
made conditional on test envbuilt
crate (build-only dependency) to 0.7build.rs
according tobuilt
crate updateslog4rs
crate to 1.3, modifyutil::logger
accordinglyanyhow
crate toutil
to satisfy log4rs update dependencychain_test_helper
test (incorrect unused code warning reported otherwise).cargo/config
->.cargo/config.toml