File tree Expand file tree Collapse file tree 8 files changed +16
-16
lines changed
stackable-versioned-macros/src/attrs/item Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 11[workspace ]
22members = [" crates/*" ]
3- resolver = " 2 "
3+ resolver = " 3 "
44
55[workspace .package ]
66authors = [
" Stackable GmbH <[email protected] >" ]
77license = " Apache-2.0"
8- edition = " 2021 "
8+ edition = " 2024 "
99repository = " https://github.com/stackabletech/operator-rs"
1010
1111[workspace .dependencies ]
Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ mod tests {
381381 #[ test]
382382 fn product_operator_run_watch_namespace ( ) {
383383 // clean env var to not interfere if already set
384- env:: remove_var ( WATCH_NAMESPACE ) ;
384+ unsafe { env:: remove_var ( WATCH_NAMESPACE ) } ;
385385
386386 // cli with namespace
387387 let opts = ProductOperatorRun :: parse_from ( [
@@ -414,7 +414,7 @@ mod tests {
414414 ) ;
415415
416416 // env with namespace
417- env:: set_var ( WATCH_NAMESPACE , "foo" ) ;
417+ unsafe { env:: set_var ( WATCH_NAMESPACE , "foo" ) } ;
418418 let opts = ProductOperatorRun :: parse_from ( [ "run" , "--product-config" , "bar" ] ) ;
419419 assert_eq ! (
420420 opts,
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ impl JsonSchema for HostName {
7979 "HostName" . to_owned ( )
8080 }
8181
82- fn json_schema ( gen : & mut schemars:: gen:: SchemaGenerator ) -> schemars:: schema:: Schema {
83- String :: json_schema ( gen )
82+ fn json_schema ( generator : & mut schemars:: r# gen:: SchemaGenerator ) -> schemars:: schema:: Schema {
83+ String :: json_schema ( generator )
8484 }
8585}
8686
Original file line number Diff line number Diff line change @@ -521,11 +521,11 @@ where
521521mod tests {
522522 macro_rules! collection {
523523 // map-like
524- ( $( $k: expr => $v: expr ) ,* $( , ) ?) => {
524+ ( $( $k: expr_2021 => $v: expr_2021 ) ,* $( , ) ?) => {
525525 [ $( ( $k, $v) , ) * ] . into( )
526526 } ;
527527 // set-like
528- ( $( $v: expr ) ,* $( , ) ?) => {
528+ ( $( $v: expr_2021 ) ,* $( , ) ?) => {
529529 [ $( $v, ) * ] . into( )
530530 } ;
531531 }
Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ impl JsonSchema for Duration {
170170 "Duration" . to_string ( )
171171 }
172172
173- fn json_schema ( gen : & mut schemars:: gen:: SchemaGenerator ) -> schemars:: schema:: Schema {
174- String :: json_schema ( gen )
173+ fn json_schema ( generator : & mut schemars:: r# gen:: SchemaGenerator ) -> schemars:: schema:: Schema {
174+ String :: json_schema ( generator )
175175 }
176176}
177177
Original file line number Diff line number Diff line change 11use schemars:: schema:: Schema ;
22
3- pub fn raw_object_schema ( _: & mut schemars:: gen:: SchemaGenerator ) -> Schema {
3+ pub fn raw_object_schema ( _: & mut schemars:: r# gen:: SchemaGenerator ) -> Schema {
44 serde_json:: from_value ( serde_json:: json!( {
55 "type" : "object" ,
66 "x-kubernetes-preserve-unknown-fields" : true ,
77 } ) )
88 . expect ( "Failed to parse JSON of custom raw object schema" )
99}
1010
11- pub fn raw_optional_object_schema ( _: & mut schemars:: gen:: SchemaGenerator ) -> Schema {
11+ pub fn raw_optional_object_schema ( _: & mut schemars:: r# gen:: SchemaGenerator ) -> Schema {
1212 serde_json:: from_value ( serde_json:: json!( {
1313 "type" : "object" ,
1414 "nullable" : true ,
@@ -17,7 +17,7 @@ pub fn raw_optional_object_schema(_: &mut schemars::gen::SchemaGenerator) -> Sch
1717 . expect ( "Failed to parse JSON of custom optional raw object schema" )
1818}
1919
20- pub fn raw_object_list_schema ( _: & mut schemars:: gen:: SchemaGenerator ) -> Schema {
20+ pub fn raw_object_list_schema ( _: & mut schemars:: r# gen:: SchemaGenerator ) -> Schema {
2121 serde_json:: from_value ( serde_json:: json!( {
2222 "type" : "array" ,
2323 "items" : {
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ impl CommonItemAttributes {
163163 // Now, iterate over all changes and ensure that their versions are
164164 // between the added and deprecated version.
165165 if !self . changes . iter ( ) . all ( |r| {
166- added_version. map_or ( true , |a| a < * r. since )
167- && deprecated_version. map_or ( true , |d| d > * r. since )
166+ added_version. is_none_or ( |a| a < * r. since )
167+ && deprecated_version. is_none_or ( |d| d > * r. since )
168168 } ) {
169169 return Err ( Error :: custom (
170170 "all changes must use versions higher than `added` and lower than `deprecated`" ,
Original file line number Diff line number Diff line change 11[toolchain ]
2- channel = " 1.84.1 "
2+ channel = " 1.85.0 "
You can’t perform that action at this time.
0 commit comments