Skip to content

Added unit tests for Swift and Rust of sized lists #30

Added unit tests for Swift and Rust of sized lists

Added unit tests for Swift and Rust of sized lists #30

Triggered via push August 21, 2024 19:32
Status Success
Total duration 3m 56s
Artifacts 3

development.yml

on: push
Matrix: Test / Build & Test
Matrix: Coverage / Coverage
Analyze  /  Check | Clippy
25s
Analyze / Check | Clippy
Analyze  /  Check | Audit
7s
Analyze / Check | Audit
Release  /  Get Version
3s
Release / Get Version
Analyze  /  Format Code
7s
Analyze / Format Code
Release  /  Create Pre Release
0s
Release / Create Pre Release
Release  /  Create Release Pull Request
0s
Release / Create Release Pull Request
Fit to window
Zoom out
Zoom in

Annotations

25 warnings
redundant closure: compiler/src/interface.rs#L154
warning: redundant closure --> compiler/src/interface.rs:154:18 | 154 | .map(|v| std::fs::read_to_string(v)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `std::fs::read_to_string` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
you should consider adding a `Default` implementation for `Loader`: compiler/src/interface.rs#L46
warning: you should consider adding a `Default` implementation for `Loader` --> compiler/src/interface.rs:46:5 | 46 | / pub fn new() -> Self { 47 | | Self { 48 | | models: Vec::new(), 49 | | imported_models: Vec::new(), 50 | | } 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 45 + impl Default for Loader { 46 + fn default() -> Self { 47 + Self::new() 48 + } 49 + } |
all variants have the same postfix: `Case`: compiler/src/gen/template/util.rs#L33
warning: all variants have the same postfix: `Case` --> compiler/src/gen/template/util.rs:33:1 | 33 | / enum Convention { 34 | | PascalCase, 35 | | SnakeCase, 36 | | ScreamingCase, 37 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` on by default
you should consider adding a `Default` implementation for `SwiftImportSolver`: compiler/src/gen/swift/solver.rs#L41
warning: you should consider adding a `Default` implementation for `SwiftImportSolver` --> compiler/src/gen/swift/solver.rs:41:5 | 41 | / pub fn new() -> Self { 42 | | Self { 43 | | import_map: HashMap::new(), 44 | | } 45 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 40 + impl Default for SwiftImportSolver { 41 + fn default() -> Self { 42 + Self::new() 43 + } 44 + } |
useless use of `format!`: compiler/src/gen/swift/message.rs#L83
warning: useless use of `format!` --> compiler/src/gen/swift/message.rs:83:18 | 83 | .map(|v| format!("{}", &v[..v.len() - 1])) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&v[..v.len() - 1]).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/union.rs#L141
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/union.rs:141:17 | 141 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 142 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 141 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 142 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/structure.rs#L233
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/structure.rs:233:17 | 233 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 234 | templates: Templates<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 233 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 234 ~ templates: Templates<'_, 'variable>, |
redundant closure: compiler/src/interface.rs#L154
warning: redundant closure --> compiler/src/interface.rs:154:18 | 154 | .map(|v| std::fs::read_to_string(v)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `std::fs::read_to_string` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message_write.rs#L60
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message_write.rs:60:17 | 60 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 61 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 60 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 61 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message_from_slice.rs#L155
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message_from_slice.rs:155:17 | 155 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 156 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 155 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 156 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message.rs#L98
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message.rs:98:17 | 98 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 99 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 99 ~ mut template: Template<'_, 'variable>, |
you should consider adding a `Default` implementation for `Loader`: compiler/src/interface.rs#L46
warning: you should consider adding a `Default` implementation for `Loader` --> compiler/src/interface.rs:46:5 | 46 | / pub fn new() -> Self { 47 | | Self { 48 | | models: Vec::new(), 49 | | imported_models: Vec::new(), 50 | | } 51 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 45 + impl Default for Loader { 46 + fn default() -> Self { 47 + Self::new() 48 + } 49 + } |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/enum.rs#L34
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/enum.rs:34:17 | 34 | pub fn generate<'fragment, 'variable, U: Utilities>( | ^^^^^^^^^ 35 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 34 ~ pub fn generate<'variable, U: Utilities>( 35 ~ mut template: Template<'_, 'variable>, |
you should consider adding a `Default` implementation for `TypePathMap`: compiler/src/compiler/util.rs#L49
warning: you should consider adding a `Default` implementation for `TypePathMap` --> compiler/src/compiler/util.rs:49:5 | 49 | / pub fn new() -> Self { 50 | | Self { 51 | | type_path_by_name: HashMap::new(), 52 | | } 53 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 48 + impl Default for TypePathMap { 49 + fn default() -> Self { 50 + Self::new() 51 + } 52 + } |
all variants have the same postfix: `Case`: compiler/src/gen/template/util.rs#L33
warning: all variants have the same postfix: `Case` --> compiler/src/gen/template/util.rs:33:1 | 33 | / enum Convention { 34 | | PascalCase, 35 | | SnakeCase, 36 | | ScreamingCase, 37 | | } | |_^ | = help: remove the postfixes and use full paths to the variants instead of glob imports = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names = note: `#[warn(clippy::enum_variant_names)]` on by default
you should consider adding a `Default` implementation for `SwiftImportSolver`: compiler/src/gen/swift/solver.rs#L41
warning: you should consider adding a `Default` implementation for `SwiftImportSolver` --> compiler/src/gen/swift/solver.rs:41:5 | 41 | / pub fn new() -> Self { 42 | | Self { 43 | | import_map: HashMap::new(), 44 | | } 45 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 40 + impl Default for SwiftImportSolver { 41 + fn default() -> Self { 42 + Self::new() 43 + } 44 + } |
useless use of `format!`: compiler/src/gen/swift/message.rs#L83
warning: useless use of `format!` --> compiler/src/gen/swift/message.rs:83:18 | 83 | .map(|v| format!("{}", &v[..v.len() - 1])) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&v[..v.len() - 1]).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/union.rs#L141
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/union.rs:141:17 | 141 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 142 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 141 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 142 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/structure.rs#L233
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/structure.rs:233:17 | 233 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 234 | templates: Templates<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 233 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 234 ~ templates: Templates<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message_write.rs#L60
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message_write.rs:60:17 | 60 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 61 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 60 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 61 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message_from_slice.rs#L155
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message_from_slice.rs:155:17 | 155 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 156 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 155 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 156 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/message.rs#L98
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/message.rs:98:17 | 98 | pub fn generate<'fragment, 'variable, U: Utilities, T: TypeMapper>( | ^^^^^^^^^ 99 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ pub fn generate<'variable, U: Utilities, T: TypeMapper>( 99 ~ mut template: Template<'_, 'variable>, |
the following explicit lifetimes could be elided: 'fragment: compiler/src/gen/base/enum.rs#L34
warning: the following explicit lifetimes could be elided: 'fragment --> compiler/src/gen/base/enum.rs:34:17 | 34 | pub fn generate<'fragment, 'variable, U: Utilities>( | ^^^^^^^^^ 35 | mut template: Template<'fragment, 'variable>, | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 34 ~ pub fn generate<'variable, U: Utilities>( 35 ~ mut template: Template<'_, 'variable>, |
you should consider adding a `Default` implementation for `TypePathMap`: compiler/src/compiler/util.rs#L49
warning: you should consider adding a `Default` implementation for `TypePathMap` --> compiler/src/compiler/util.rs:49:5 | 49 | / pub fn new() -> Self { 50 | | Self { 51 | | type_path_by_name: HashMap::new(), 52 | | } 53 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 48 + impl Default for TypePathMap { 49 + fn default() -> Self { 50 + Self::new() 51 + } 52 + } |
operator precedence can trip the unwary: runtime/src/codec/bits.rs#L233
warning: operator precedence can trip the unwary --> runtime/src/codec/bits.rs:233:28 | 233 | let reset_mask = !(mask << 8 - (BIT_SIZE % 8) - BIT_OFFSET); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `mask << (8 - (BIT_SIZE % 8) - BIT_OFFSET)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence = note: `#[warn(clippy::precedence)]` on by default

Artifacts

Produced during runtime
Name Size
coverage-macos-12
235 KB
coverage-ubuntu-20.04
235 KB
coverage-windows-2019
232 KB