Skip to content

Conversation

@zeeshanlakhani
Copy link
Contributor

My editor complains when using 2024 edition enhancements, even though the min version here is Rust 1.90.

This PR aligns us with Omicron's formatting style (and edition).

Copy link
Contributor

@FelixMcFelix FelixMcFelix left a comment

Choose a reason for hiding this comment

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

This looks to generally condense things overall. I'm happy with it since it matches the decisions we've made in other repos.

I did attempt to verify the change on my Macbook to some extent:

kyle@Mac dendrite % git diff
kyle@Mac dendrite % git diff origin/zl/match-omicron-fmt-edition --stat
 asic/src/chaos/mod.rs              | 10 ++++++++--
 asic/src/chaos/table.rs            |  5 ++++-
 asic/src/lib.rs                    |  5 ++++-
 asic/src/softnpu/mgmt.rs           |  7 +++++--
 asic/src/softnpu/mod.rs            | 30 ++++++++++++++++++++++--------
 asic/src/softnpu/table.rs          |  6 +++++-
 asic/src/tofino_asic/bf_wrapper.rs | 23 ++++++++++++++++++-----
 asic/src/tofino_asic/link_fsm.rs   |  6 +++++-
 asic/src/tofino_asic/mcast.rs      | 16 +++++++++++++---
 asic/src/tofino_asic/mod.rs        | 18 +++++++++++++++---
 asic/src/tofino_asic/ports.rs      | 41 ++++++++++++++++++++++++++++++++---------
 asic/src/tofino_asic/qsfp.rs       | 30 +++++++++++++++++++++++++-----
 asic/src/tofino_asic/serdes.rs     | 27 +++++++++++++++++++++------
 asic/src/tofino_asic/table.rs      | 43 ++++++++++++++++++++++++++++++++-----------
 asic/src/tofino_common/mod.rs      |  7 ++++++-
 asic/src/tofino_stub/mcast.rs      |  4 +++-
 asic/src/tofino_stub/mod.rs        |  5 ++++-
 asic/src/tofino_stub/ports.rs      | 22 ++++++++++++++++++----
 pcap/src/lib.rs                    | 10 +++++++---
 19 files changed, 247 insertions(+), 68 deletions(-)
kyle@Mac dendrite % cargo fmt --check
Error writing files: failed to resolve mod `genpd`: /Users/kyle/gits/dendrite/asic/src/tofino_asic/genpd.rs does not exist
Error writing files: failed to resolve mod `ffi`: /Users/kyle/gits/dendrite/pcap/src/ffi.rs does not exist
kyle@Mac dendrite %

So I have some divergence, but that lines up with some of the modules just not playing well on this platform. The diff itself does just look like, as reported, cargo fmt has bailed on those modules for me.

@zeeshanlakhani
Copy link
Contributor Author

zeeshanlakhani commented Jan 15, 2026

@FelixMcFelix I can't ignore those generated files, and it seems to be OSX only, as they can't build.

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