-
Notifications
You must be signed in to change notification settings - Fork 1
structopt -> clap, Rust 1.90/2024, swadm link apply command #134
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
Conversation
see OPTE #861
5cf128e to
8db60d6
Compare
|
Able to move to 1.90 after |
|
|
||
| // Parse all of the arguments to an action | ||
| fn get_action_args(variant: &Variant) -> Result<Vec<ActionArg>> { | ||
| fn get_action_args(variant: &Variant) -> Result<Vec<ActionArg<'_>>> { |
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.
This is weird. I guess it's because ActionArg contains Ident<'a>? I wonder why Ident has a lifetime. Hmm. Not for today.
| // we wouldn't expect this state to change other than at our direction, this | ||
| // callback will generally be a no-op. The only exception would be if somebody | ||
| // were using the bf cli to manipulate ports, at which point all bets are off as | ||
| // to what's happening with the port. |
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.
really? Huh.
| // Sizes of the port and LAG bitmap arrays in a multicast group | ||
| pub const BF_MC_PORT_ARRAY_SIZE: usize = (BF_PORT_COUNT as usize + 7) / 8; | ||
| pub const BF_MC_LAG_ARRAY_SIZE: usize = (BF_LAG_COUNT as usize + 7) / 8; | ||
| pub const BF_MC_PORT_ARRAY_SIZE: usize = (BF_PORT_COUNT as usize).div_ceil(8); |
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.
Did clippy pick this up? I'm surprised.
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.
Clippy did indeed.
| } | ||
| } | ||
|
|
||
| /// A Vlan identifier, made up of a port, link, and vlan tag. |
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.
I thought I took all this out as part of the latest ECMP work. Hmm.
0a849b5 to
9c68ec2
Compare
Fixes
Which is closed as completed, but has not been done yet.
After removing structopt I bumped dependencies. This required going to rust 1.90 to pick up some features OPTE is now using that have only been stable since 1.90. Then clippy got angry with me and I needed let chains to solve some of the clippy rage cleanly. So I also moved to 2024.
The majority of the changes in this PR are dealing with clippy in going to Rust 1.90/2024.
The move from structopt to clap is in the first commit. Then there are a bunch of commits dealing with the rust version bump. Then c82dae4 adds the link apply command and the commits that follow fix up a few things with aliases I noticed when using the new
swadmto do some debugging on a racklette.