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

Fix clippy warning in common when using only fs flag #1504

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

Alenar
Copy link
Collaborator

@Alenar Alenar commented Feb 14, 2024

Content

This PR fix the clippy warning that can be seen in some CI jobs :

Run cargo build --lib --release --package mithril-stm --package mithril-client --features full,unstable 
   Compiling mithril-common v0.3.2+80ee079 (/home/runner/work/mithril/mithril/mithril-common)
   Compiling mithril-stm v0.3.15+80ee079 (/home/runner/work/mithril/mithril/mithril-stm)
warning: function `try_inspect` is never used
  --> mithril-common/src/chain_observer/model.rs:33:12
   |
33 |     pub fn try_inspect<R>(inner: Vec<u8>) -> StdResult<R>
   |            ^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: type alias `Datums` is never used
  --> mithril-common/src/chain_observer/model.rs:46:14
   |
46 |     pub type Datums = Vec<TxDatum>;
   |              ^^^^^^

warning: `mithril-common` (lib) generated 2 warnings
   Compiling mithril-client v0.6.2+80ee079 (/home/runner/work/mithril/mithril/mithril-client)
    Finished release [optimized] target(s) in 14.12s

It also add a cfg_fs_random "flag" in mithril-common to correctly document the feature flag needed by some objects.

Pre-submit checklist

  • Branch
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

And fix build warnings when using some features combinatory
@Alenar Alenar self-assigned this Feb 14, 2024
Copy link
Collaborator

@dlachaume dlachaume left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link

github-actions bot commented Feb 14, 2024

Test Results

  3 files  ±0   40 suites  ±0   9m 4s ⏱️ -17s
830 tests ±0  830 ✅ ±0  0 💤 ±0  0 ❌ ±0 
917 runs  ±0  917 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 264bd59. ± Comparison against base commit 939e16e.

♻️ This comment has been updated with latest results.

@Alenar Alenar temporarily deployed to testing-preview February 14, 2024 09:47 — with GitHub Actions Inactive
@Alenar Alenar temporarily deployed to testing-sanchonet February 14, 2024 09:47 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Alenar Alenar merged commit bc142fc into main Feb 14, 2024
40 of 41 checks passed
@Alenar Alenar deleted the djo/fix_clippy_warn_in_common branch February 14, 2024 09:52
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.

3 participants