Skip to content

Updated generator to word with new description model #35

Updated generator to word with new description model

Updated generator to word with new description model #35

Triggered via push September 26, 2024 19:09
Status Success
Total duration 3m 26s
Artifacts 3

development.yml

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

Annotations

46 warnings
length comparison to one: /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/unions2/structures.rs#L184
warning: length comparison to one --> /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/unions2/structures.rs:184:12 | 184 | if self.data.as_ref().len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.as_ref().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
length comparison to one: /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/unions2/structures.rs#L29
warning: length comparison to one --> /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/unions2/structures.rs:29:12 | 29 | if self.data.as_ref().len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.as_ref().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
length comparison to one: /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/values/structures.rs#L525
warning: length comparison to one --> /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/values/structures.rs:525:12 | 525 | if self.data.as_ref().len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.as_ref().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
length comparison to one: /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/values/structures.rs#L29
warning: length comparison to one --> /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/values/structures.rs:29:12 | 29 | if self.data.as_ref().len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.as_ref().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
length comparison to one: /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/enums/structures.rs#L29
warning: length comparison to one --> /home/runner/work/tools.proto/tools.proto/target/debug/build/testprog-cc0d2f02894a79f3/out/enums/structures.rs:29:12 | 29 | if self.data.as_ref().len() < 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.data.as_ref().is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: cli/src/builder.rs#L55
warning: this expression creates a reference which is immediately dereferenced by the compiler --> cli/src/builder.rs:55:66 | 55 | let (context, mut generator) = Generator::new(protocols, &output, generator); | ^^^^^^^ help: change this to: `output` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/tools/mod.rs#L59
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/tools/mod.rs:59:50 | 59 | Self::generate(&generator, &mut context, &config)?; | ^^^^^^^ help: change this to: `config` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: compiler/src/api/tools/mod.rs#L50
warning: the following explicit lifetimes could be elided: 'a --> compiler/src/api/tools/mod.rs:50:17 | 50 | fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::C... | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 50 - fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::Config<Self::Params<'_>>) -> Result<(), Error>; 50 + fn generate<'b>(generator: &'b Generator<'_, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::Config<Self::Params<'_>>) -> Result<(), Error>; |
the following explicit lifetimes could be elided: 'a: compiler/src/api/tools/rust.rs#L52
warning: the following explicit lifetimes could be elided: 'a --> compiler/src/api/tools/rust.rs:52:17 | 52 | fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Par... | ^^ ^^ | = 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 | 52 - fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Params<'_>>) -> Result<(), Error> { 52 + fn generate<'b>(generator: &'b Generator<'_, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Params<'_>>) -> Result<(), Error> { |
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/core/generator.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/core/generator.rs:176:78 | 176 | let umbrella = G::generate_umbrella(name, iter.iter().map(|v| &**v), &generator_params) | ^^^^^^^^^^^^^^^^^ help: change this to: `generator_params` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: compiler/src/api/core/generator.rs#L148
warning: the borrowed expression implements the required traits --> compiler/src/api/core/generator.rs:148:48 | 148 | let out_path = self.out_directory.join(&name); | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/core/generator.rs#L147
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/core/generator.rs:147:43 | 147 | let files = G::generate(protocol, &generator_params).map_err(|e| Error::Generator(e.to_string()))?; | ^^^^^^^^^^^^^^^^^ help: change this to: `generator_params` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
length comparison to zero: compiler/src/api/core/loader.rs#L97
warning: length comparison to zero --> compiler/src/api/core/loader.rs:97:31 | 97 | if iterations == 0 && self.models.len() > 0 { | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.models.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
the borrowed expression implements the required traits: compiler/src/api/core/loader.rs#L59
warning: the borrowed expression implements the required traits --> compiler/src/api/core/loader.rs:59:37 | 59 | self.load_from_file(&file.path(), package)? | ^^^^^^^^^^^^ help: change this to: `file.path()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/tools/mod.rs#L59
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/tools/mod.rs:59:50 | 59 | Self::generate(&generator, &mut context, &config)?; | ^^^^^^^ help: change this to: `config` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: compiler/src/api/tools/mod.rs#L50
warning: the following explicit lifetimes could be elided: 'a --> compiler/src/api/tools/mod.rs:50:17 | 50 | fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::C... | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 50 - fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::Config<Self::Params<'_>>) -> Result<(), Error>; 50 + fn generate<'b>(generator: &'b Generator<'_, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &config::model::Config<Self::Params<'_>>) -> Result<(), Error>; |
the following explicit lifetimes could be elided: 'a: compiler/src/api/tools/rust.rs#L52
warning: the following explicit lifetimes could be elided: 'a --> compiler/src/api/tools/rust.rs:52:17 | 52 | fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Par... | ^^ ^^ | = 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 | 52 - fn generate<'a, 'b>(generator: &'b Generator<'a, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Params<'_>>) -> Result<(), Error> { 52 + fn generate<'b>(generator: &'b Generator<'_, Self::Solver, Self::Generator>, context: &mut Context<'b>, config: &Config<Self::Params<'_>>) -> Result<(), Error> { |
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/core/generator.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/core/generator.rs:176:78 | 176 | let umbrella = G::generate_umbrella(name, iter.iter().map(|v| &**v), &generator_params) | ^^^^^^^^^^^^^^^^^ help: change this to: `generator_params` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: compiler/src/api/core/generator.rs#L148
warning: the borrowed expression implements the required traits --> compiler/src/api/core/generator.rs:148:48 | 148 | let out_path = self.out_directory.join(&name); | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/api/core/generator.rs#L147
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/api/core/generator.rs:147:43 | 147 | let files = G::generate(protocol, &generator_params).map_err(|e| Error::Generator(e.to_string()))?; | ^^^^^^^^^^^^^^^^^ help: change this to: `generator_params` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
length comparison to zero: compiler/src/api/core/loader.rs#L97
warning: length comparison to zero --> compiler/src/api/core/loader.rs:97:31 | 97 | if iterations == 0 && self.models.len() > 0 { | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.models.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
the borrowed expression implements the required traits: compiler/src/api/core/loader.rs#L59
warning: the borrowed expression implements the required traits --> compiler/src/api/core/loader.rs:59:37 | 59 | self.load_from_file(&file.path(), package)? | ^^^^^^^^^^^^ help: change this to: `file.path()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L76
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:76:70 | 76 | let decl_unions = proto.unions.iter().map(|v| gen_union_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L75
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:75:93 | 75 | let impl_write_messages_code = proto.messages.iter().map(|v| gen_message_write_impl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L74
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:74:103 | 74 | let impl_from_slice_messages_code = proto.messages.iter().map(|v| gen_message_from_slice_impl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L73
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:73:81 | 73 | let decl_messages_code = proto.messages.iter().map(|v| gen_message_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L72
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:72:67 | 72 | let decl_enums = proto.enums.iter().map(|v| gen_enum_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L76
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:76:70 | 76 | let decl_unions = proto.unions.iter().map(|v| gen_union_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L75
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:75:93 | 75 | let impl_write_messages_code = proto.messages.iter().map(|v| gen_message_write_impl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L74
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:74:103 | 74 | let impl_from_slice_messages_code = proto.messages.iter().map(|v| gen_message_from_slice_impl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L73
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:73:81 | 73 | let decl_messages_code = proto.messages.iter().map(|v| gen_message_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L72
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:72:67 | 72 | let decl_enums = proto.enums.iter().map(|v| gen_enum_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L71
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:71:79 | 71 | let decl_structures = proto.structs.iter().map(|v| gen_structure_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: compiler/src/gen/swift/mod.rs#L71
warning: this expression creates a reference which is immediately dereferenced by the compiler --> compiler/src/gen/swift/mod.rs:71:79 | 71 | let decl_structures = proto.structs.iter().map(|v| gen_structure_decl(&proto, v)); | ^^^^^^ help: change this to: `proto` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this lifetime isn't used in the impl: compiler/src/gen/rust/solver.rs#L34
warning: this lifetime isn't used in the impl --> compiler/src/gen/rust/solver.rs:34:6 | 34 | impl<'a> ImportSolver for RustImportSolver { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
this lifetime isn't used in the impl: compiler/src/gen/rust/solver.rs#L34
warning: this lifetime isn't used in the impl --> compiler/src/gen/rust/solver.rs:34:6 | 34 | impl<'a> ImportSolver for RustImportSolver { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: compiler/src/gen/rust/util.rs#L94
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference --> compiler/src/gen/rust/util.rs:94:36 | 94 | pub fn to_string_with_defaults(self) -> Cow<'a, str> { | ^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: compiler/src/gen/rust/util.rs#L74
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference --> compiler/src/gen/rust/util.rs:74:22 | 74 | pub fn to_string(self) -> Cow<'a, str> { | ^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `#[warn(clippy::wrong_self_convention)]` on by default
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: compiler/src/gen/rust/util.rs#L94
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference --> compiler/src/gen/rust/util.rs:94:36 | 94 | pub fn to_string_with_defaults(self) -> Cow<'a, str> { | ^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference: compiler/src/gen/rust/util.rs#L74
warning: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference --> compiler/src/gen/rust/util.rs:74:22 | 74 | pub fn to_string(self) -> Cow<'a, str> { | ^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `#[warn(clippy::wrong_self_convention)]` on by default
this `impl` can be derived: compiler/src/gen/template/options.rs#L37
warning: this `impl` can be derived --> compiler/src/gen/template/options.rs:37:1 | 37 | / impl<'a> Default for Options<'a> { 38 | | fn default() -> Self { 39 | | Self { 40 | | function_map: FunctionMap::default(), ... | 43 | | } 44 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 32 + #[derive(Default)] 33 | pub struct Options<'a> { |
this `impl` can be derived: compiler/src/gen/template/options.rs#L37
warning: this `impl` can be derived --> compiler/src/gen/template/options.rs:37:1 | 37 | / impl<'a> Default for Options<'a> { 38 | | fn default() -> Self { 39 | | Self { 40 | | function_map: FunctionMap::default(), ... | 43 | | } 44 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 32 + #[derive(Default)] 33 | pub struct Options<'a> { |
use of `or_insert` to construct default value: compiler/src/gen/hook.rs#L102
warning: use of `or_insert` to construct default value --> compiler/src/gen/hook.rs:102:42 | 102 | let entry = self.map.entry(name).or_insert(Vec::new()); | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `#[warn(clippy::unwrap_or_default)]` on by default
use of `or_insert` to construct default value: compiler/src/gen/hook.rs#L102
warning: use of `or_insert` to construct default value --> compiler/src/gen/hook.rs:102:42 | 102 | let entry = self.map.entry(name).or_insert(Vec::new()); | ^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `#[warn(clippy::unwrap_or_default)]` on by default
you should consider adding a `Default` implementation for `ObjectStore<T>`: compiler/src/compiler/util/store.rs#L41
warning: you should consider adding a `Default` implementation for `ObjectStore<T>` --> compiler/src/compiler/util/store.rs:41:5 | 41 | / pub fn new() -> Self { 42 | | Self { 43 | | objects: Vec::new(), 44 | | objects_by_name: IndexMap::new(), 45 | | objects_imports: HashMap::new() 46 | | } 47 | | } | |_____^ | = 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 | 40 + impl<T: bp3d_util::index_map::Index<Key=str>> Default for ObjectStore<T> { 41 + fn default() -> Self { 42 + Self::new() 43 + } 44 + } |
you should consider adding a `Default` implementation for `ObjectStore<T>`: compiler/src/compiler/util/store.rs#L41
warning: you should consider adding a `Default` implementation for `ObjectStore<T>` --> compiler/src/compiler/util/store.rs:41:5 | 41 | / pub fn new() -> Self { 42 | | Self { 43 | | objects: Vec::new(), 44 | | objects_by_name: IndexMap::new(), 45 | | objects_imports: HashMap::new() 46 | | } 47 | | } | |_____^ | = 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 | 40 + impl<T: bp3d_util::index_map::Index<Key=str>> Default for ObjectStore<T> { 41 + fn default() -> Self { 42 + Self::new() 43 + } 44 + } |

Artifacts

Produced during runtime
Name Size
coverage-macos-12
294 KB
coverage-ubuntu-20.04
294 KB
coverage-windows-2019
291 KB