Skip to content
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

Layout's #182

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

wip: `Registry`

f1d3a84
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Draft

Layout's #182

wip: `Registry`
f1d3a84
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Nov 25, 2023 in 0s

clippy

10 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 10
Note 0
Help 0

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check warning on line 15 in src/registry.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type parameter `T` goes unused in function definition

warning: type parameter `T` goes unused in function definition
  --> src/registry.rs:15:24
   |
15 |     fn insert_with_name<T: Type>(&mut self, name: impl Into<Cow<'static, str>>) {
   |                        ^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

Check warning on line 11 in src/registry.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type parameter `T` goes unused in function definition

warning: type parameter `T` goes unused in function definition
  --> src/registry.rs:11:14
   |
11 |     fn insert<T: NamedType>(&mut self) {
   |              ^^^^^^^^^^^^^^ help: consider removing the parameter
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
   = note: `#[warn(clippy::extra_unused_type_parameters)]` implied by `#[warn(clippy::all)]`

Check warning on line 90 in src/lang/ts/export_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`panic` should not be present in production code

warning: `panic` should not be present in production code
  --> src/lang/ts/export_config.rs:90:40
   |
90 |                     .unwrap_or_else(|| panic!("Type '{:?}' not found in type map", r.sid()));
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic

Check warning on line 83 in src/lang/ts/export_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`panic` should not be present in production code

warning: `panic` should not be present in production code
  --> src/lang/ts/export_config.rs:83:40
   |
83 |                     .unwrap_or_else(|| panic!("Type '{:?}' not found in type map", r.sid()));
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic
note: the lint level is defined here
  --> src/lib.rs:3:43
   |
3  | #![warn(clippy::all, clippy::unwrap_used, clippy::panic)] // TODO: missing_docs
   |                                           ^^^^^^^^^^^^^

Check warning on line 75 in src/lang/ts/export_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using a reference to `Cow` is not recommended

warning: using a reference to `Cow` is not recommended
  --> src/lang/ts/export_config.rs:75:15
   |
75 |         name: &Cow<'static, str>,
   |               ^^^^^^^^^^^^^^^^^^ help: change this to: `&str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg

Check warning on line 37 in src/lang/ts/export_config.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using a reference to `Cow` is not recommended

warning: using a reference to `Cow` is not recommended
  --> src/lang/ts/export_config.rs:37:15
   |
37 |         name: &Cow<'static, str>,
   |               ^^^^^^^^^^^^^^^^^^ help: change this to: `&str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
note: the lint level is defined here
  --> src/lib.rs:3:9
   |
3  | #![warn(clippy::all, clippy::unwrap_used, clippy::panic)] // TODO: missing_docs
   |         ^^^^^^^^^^^
   = note: `#[warn(clippy::ptr_arg)]` implied by `#[warn(clippy::all)]`

Check warning on line 11 in src/registry.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `insert` and `insert_with_name` are never used

warning: methods `insert` and `insert_with_name` are never used
  --> src/registry.rs:11:8
   |
10 | impl Registry {
   | ------------- methods in this implementation
11 |     fn insert<T: NamedType>(&mut self) {
   |        ^^^^^^
...
15 |     fn insert_with_name<T: Type>(&mut self, name: impl Into<Cow<'static, str>>) {
   |        ^^^^^^^^^^^^^^^^

Check warning on line 7 in src/registry.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `types` is never read

warning: field `types` is never read
 --> src/registry.rs:7:5
  |
6 | pub struct Registry {
  |            -------- field in this struct
7 |     types: Vec<NamedDataType>,
  |     ^^^^^
  |
  = note: `Registry` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

Check warning on line 66 in src/lang/ts/reserved_terms.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `RESERVED_IDENTS` is never used

warning: constant `RESERVED_IDENTS` is never used
  --> src/lang/ts/reserved_terms.rs:66:18
   |
66 | pub(crate) const RESERVED_IDENTS: &[&str] = &[
   |                  ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 15 in src/registry.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `name`

warning: unused variable: `name`
  --> src/registry.rs:15:45
   |
15 |     fn insert_with_name<T: Type>(&mut self, name: impl Into<Cow<'static, str>>) {
   |                                             ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
   |
   = note: `#[warn(unused_variables)]` on by default