Skip to content

return Option<&T> instead of &Option<T>

Sign in for the full log view
GitHub Actions / clippy succeeded Sep 3, 2023 in 1s

clippy

64 warnings

Details

Results

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

Versions

  • rustc 1.72.0 (5680fa18f 2023-08-23)
  • cargo 1.72.0 (103a7ff2e 2023-08-15)
  • clippy 0.1.72 (5680fa1 2023-08-23)

Annotations

Check warning on line 116 in src/type/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for an associated constant

warning: missing documentation for an associated constant
   --> src/type/mod.rs:116:5
    |
116 |     const IMPL_LOCATION: ImplLocation;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 115 in src/type/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for an associated constant

warning: missing documentation for an associated constant
   --> src/type/mod.rs:115:5
    |
115 |     const SID: SpectaID;
    |     ^^^^^^^^^^^^^^^^^^^

Check warning on line 27 in src/type/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/type/mod.rs:27:5
   |
27 |     InvalidType(ImplLocation, &'static str),
   |     ^^^^^^^^^^^

Check warning on line 197 in src/lang/ts/mod.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/mod.rs:197:44
    |
197 |                         .unwrap_or_else(|| panic!("Type {} has no value!", r.name()));
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#panic

Check warning on line 195 in src/lang/ts/mod.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/mod.rs:195:44
    |
195 |                         .unwrap_or_else(|| panic!("Type {} not found!", r.name()))
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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:58:43
    |
58  | #![warn(clippy::all, clippy::unwrap_used, clippy::panic, missing_docs)]
    |                                           ^^^^^^^^^^^^^

Check warning on line 48 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:48:5
   |
48 |     Other(ExportPath, String),
   |     ^^^^^

Check warning on line 46 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:46:5
   |
46 |     Io(#[from] std::io::Error),
   |     ^^

Check warning on line 44 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:44:5
   |
44 |     SpectaExportError(#[from] ExportError),
   |     ^^^^^^^^^^^^^^^^^

Check warning on line 42 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:42:5
   |
42 |     DuplicateTypeName(Cow<'static, str>, ImplLocation, ImplLocation),
   |     ^^^^^^^^^^^^^^^^^

Check warning on line 40 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:40:5
   |
40 |     InvalidTagging(ExportPath),
   |     ^^^^^^^^^^^^^^

Check warning on line 38 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:38:5
   |
38 |     ForbiddenName(NamedLocation, ExportPath, &'static str),
   |     ^^^^^^^^^^^^^

Check warning on line 36 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:36:5
   |
36 |     UnableToTagUnnamedType(ExportPath),
   |     ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 34 in src/lang/ts/error.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a variant

warning: missing documentation for a variant
  --> src/lang/ts/error.rs:34:5
   |
34 |     BigIntForbidden(ExportPath),
   |     ^^^^^^^^^^^^^^^

Check warning on line 20 in src/export/ts.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `export::export::TypesIter`

warning: useless conversion to the same type: `export::export::TypesIter`
  --> src/export/ts.rs:19:17
   |
19 |       let types = get_types()?
   |  _________________^
20 | |         .into_iter()
   | |____________________^ help: consider removing `.into_iter()`: `get_types()?`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
   = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]`

Check warning on line 1 in src/export/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

module has the same name as its containing module

warning: module has the same name as its containing module
 --> src/export/mod.rs:1:1
  |
1 | mod export;
  | ^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
  = note: `#[warn(clippy::module_inception)]` implied by `#[warn(clippy::all)]`

Check warning on line 88 in src/datatype/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/mod.rs:88:5
   |
88 |     pub fn generics(&self) -> impl Iterator<Item = &DataType> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 84 in src/datatype/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/mod.rs:84:5
   |
84 |     pub fn sid(&self) -> SpectaID {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 80 in src/datatype/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/mod.rs:80:5
   |
80 |     pub fn name(&self) -> &Cow<'static, str> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 19 in src/datatype/tuple.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct field

warning: missing documentation for a struct field
  --> src/datatype/tuple.rs:19:9
   |
19 |         generics: Vec<GenericType>,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 18 in src/datatype/tuple.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct field

warning: missing documentation for a struct field
  --> src/datatype/tuple.rs:18:9
   |
18 |         fields: Vec<DataType>,
   |         ^^^^^^^^^^^^^^^^^^^^^

Check warning on line 68 in src/datatype/struct.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/struct.rs:68:5
   |
68 |     pub fn tag(&self) -> Option<&Cow<'static, str>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 64 in src/datatype/struct.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/struct.rs:64:5
   |
64 |     pub fn fields(&self) -> impl Iterator<Item = &StructField> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 60 in src/datatype/struct.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/struct.rs:60:5
   |
60 |     pub fn generics(&self) -> impl Iterator<Item = &GenericType> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 27 in src/datatype/struct.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/struct.rs:27:5
   |
27 |     pub fn ty(&self) -> &DataType {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 23 in src/datatype/struct.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a method

warning: missing documentation for a method
  --> src/datatype/struct.rs:23:5
   |
23 |     pub fn flatten(&self) -> bool {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^