File tree Expand file tree Collapse file tree 5 files changed +5
-6
lines changed
crates/stackable-versioned-macros/src Expand file tree Collapse file tree 5 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ impl CommonRootArguments {
2828
2929 let is_sorted = self . versions . iter ( ) . is_sorted_by_key ( |v| v. name ) ;
3030
31- // It needs to be sorted, even tho the definition could be unsorted (if allow_unsorted is
32- // set).
31+ // It needs to be sorted, even though the definition could be unsorted
32+ // (if allow_unsorted is set).
3333 self . versions . sort_by ( |lhs, rhs| lhs. name . cmp ( & rhs. name ) ) ;
3434
3535 if !self . options . allow_unsorted . is_present ( ) && !is_sorted {
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ impl Enum {
174174
175175 /// Returns whether any variant is deprecated in the provided `version`.
176176 fn is_any_variant_deprecated ( & self , version : & VersionDefinition ) -> bool {
177- // First, iterate over all variants. Any will return true if any of the
177+ // First, iterate over all variants. The `any` function will return true if any of the
178178 // function invocations return true. If a field doesn't have a chain,
179179 // we can safely default to false (unversioned fields cannot be
180180 // deprecated). Then we retrieve the status of the field and ensure it
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ impl StandaloneContainer {
9191 item_struct : ItemStruct ,
9292 attributes : StandaloneContainerAttributes ,
9393 ) -> Result < Self > {
94- // TODO (@Techassi): Only pass the fields we need from item struct instead of moving as a whole
9594 let versions: Vec < _ > = ( & attributes) . into ( ) ;
9695 let vis = item_struct. vis . clone ( ) ;
9796
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ impl Struct {
311311
312312 let enum_ident = & self . common . idents . kubernetes ;
313313
314- // Only add the #[automatically_derived] attribute only if this impl is used outside of a
314+ // Only add the #[automatically_derived] attribute if this impl is used outside of a
315315 // module (in standalone mode).
316316 let automatically_derived = is_nested. not ( ) . then ( || quote ! { #[ automatically_derived] } ) ;
317317
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ impl VersionedVariant {
6565 let fields = & self . fields ;
6666
6767 match & self . changes {
68- // NOTE (@Techassi): https://rust-lang.github.io/rust-clippy/master/index.html#/expect_fun_call
68+ // NOTE (@Techassi): `unwrap_or_else` used instead of `expect`. See: https://rust-lang.github.io/rust-clippy/master/index.html#/expect_fun_call
6969 Some ( changes) => match changes. get ( & version. inner ) . unwrap_or_else ( || {
7070 panic ! (
7171 "internal error: chain must contain container version {}" ,
You can’t perform that action at this time.
0 commit comments