Skip to content

Add boxed variant comparisons #2945

Add boxed variant comparisons

Add boxed variant comparisons #2945

Triggered via push January 4, 2025 04:18
Status Success
Total duration 6m 41s
Artifacts

coverage.yml

on: push
Matrix: Build and Test
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 34 warnings
this expression creates a reference which is immediately dereferenced by the compiler: partiql-value/src/variant.rs#L189
error: this expression creates a reference which is immediately dereferenced by the compiler --> partiql-value/src/variant.rs:189:60 | 189 | l.type_tag().cmp(&r.type_tag()).then_with(|| l.cmp(&r)) | ^^ help: change this to: `r` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[deny(clippy::needless_borrow)]` implied by `#[deny(clippy::all)]`
the following explicit lifetimes could be elided: 'a: partiql-value/src/sort.rs#L21
error: the following explicit lifetimes could be elided: 'a --> partiql-value/src/sort.rs:21:6 | 21 | impl<'a, const NULLS_FIRST: bool> Ord for NullSortedValue<'a, NULLS_FIRST, Value> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes note: the lint level is defined here --> partiql-value/src/lib.rs:2:9 | 2 | #![deny(clippy::all)] | ^^^^^^^^^^^ = note: `#[deny(clippy::needless_lifetimes)]` implied by `#[deny(clippy::all)]` help: elide the lifetimes | 21 - impl<'a, const NULLS_FIRST: bool> Ord for NullSortedValue<'a, NULLS_FIRST, Value> { 21 + impl<const NULLS_FIRST: bool> Ord for NullSortedValue<'_, NULLS_FIRST, Value> { |
this expression creates a reference which is immediately dereferenced by the compiler: partiql-value/src/variant.rs#L189
error: this expression creates a reference which is immediately dereferenced by the compiler --> partiql-value/src/variant.rs:189:60 | 189 | l.type_tag().cmp(&r.type_tag()).then_with(|| l.cmp(&r)) | ^^ help: change this to: `r` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[deny(clippy::needless_borrow)]` implied by `#[deny(clippy::all)]`
the following explicit lifetimes could be elided: 'a: partiql-value/src/sort.rs#L21
error: the following explicit lifetimes could be elided: 'a --> partiql-value/src/sort.rs:21:6 | 21 | impl<'a, const NULLS_FIRST: bool> Ord for NullSortedValue<'a, NULLS_FIRST, Value> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes note: the lint level is defined here --> partiql-value/src/lib.rs:2:9 | 2 | #![deny(clippy::all)] | ^^^^^^^^^^^ = note: `#[deny(clippy::needless_lifetimes)]` implied by `#[deny(clippy::all)]` help: elide the lifetimes | 21 - impl<'a, const NULLS_FIRST: bool> Ord for NullSortedValue<'a, NULLS_FIRST, Value> { 21 + impl<const NULLS_FIRST: bool> Ord for NullSortedValue<'_, NULLS_FIRST, Value> { |
field `0` is never read: partiql-value/src/variant.rs#L121
warning: field `0` is never read --> partiql-value/src/variant.rs:121:28 | 121 | pub struct VariantIter<'a>(BoxedVariantValueIter<'a>); | ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this struct | = help: consider removing this field = note: `#[warn(dead_code)]` on by default
unused variable: `doc`: partiql-value/src/value/iter.rs#L43
warning: unused variable: `doc` --> partiql-value/src/value/iter.rs:43:33 | 43 | ValueIter::Embedded(doc) => { | ^^^ help: if this is intentional, prefix it with an underscore: `_doc`
unused variable: `doc`: partiql-value/src/value/iter.rs#L23
warning: unused variable: `doc` --> partiql-value/src/value/iter.rs:23:33 | 23 | ValueIter::Embedded(doc) => { | ^^^ help: if this is intentional, prefix it with an underscore: `_doc` | = note: `#[warn(unused_variables)]` on by default
unused import: `Write`: partiql-value/src/variant.rs#L17
warning: unused import: `Write` --> partiql-value/src/variant.rs:17:43 | 17 | use std::fmt::{Debug, Formatter, Pointer, Write}; | ^^^^^
unused imports: `Deserialize` and `Serialize`: partiql-value/src/lib.rs#L30
warning: unused imports: `Deserialize` and `Serialize` --> partiql-value/src/lib.rs:30:13 | 30 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^
unused import: `Pointer`: partiql-value/src/variant.rs#L17
warning: unused import: `Pointer` --> partiql-value/src/variant.rs:17:34 | 17 | use std::fmt::{Debug, Formatter, Pointer, Write}; | ^^^^^^^
unused import: `List`: partiql-value/src/variant.rs#L9
warning: unused import: `List` --> partiql-value/src/variant.rs:9:13 | 9 | use crate::{List, NullSortedValue, Value}; | ^^^^
unused import: `std::borrow::Cow`: partiql-value/src/sort.rs#L3
warning: unused import: `std::borrow::Cow` --> partiql-value/src/sort.rs:3:5 | 3 | use std::borrow::Cow; | ^^^^^^^^^^^^^^^^
unused imports: `DatumCategory` and `DatumLower`: partiql-value/src/sort.rs#L1
warning: unused imports: `DatumCategory` and `DatumLower` --> partiql-value/src/sort.rs:1:20 | 1 | use crate::datum::{DatumCategory, DatumLower}; | ^^^^^^^^^^^^^ ^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L164
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:164:13 | 163 | pub struct EvaluationFailAssertion { | ----------------------- field in this struct 164 | pub result: String, | ^^^^^^ | = note: `EvaluationFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L157
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:157:13 | 156 | pub struct EvaluationSuccessAssertion { | -------------------------- field in this struct 157 | pub result: String, | ^^^^^^ | = note: `EvaluationSuccessAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L152
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:152:13 | 151 | pub struct StaticAnalysisFailAssertion { | --------------------------- field in this struct 152 | pub result: String, | ^^^^^^ | = note: `StaticAnalysisFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L147
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:147:13 | 146 | pub struct SyntaxFailAssertion { | ------------------- field in this struct 147 | pub result: String, | ^^^^^^ | = note: `SyntaxFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L142
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:142:13 | 141 | pub struct SyntaxSuccessAssertion { | ---------------------- field in this struct 142 | pub result: String, | ^^^^^^ | = note: `SyntaxSuccessAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L75
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:75:28 | 75 | StaticAnalysisFail(StaticAnalysisFailAssertion), | ------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 75 | StaticAnalysisFail(()), | ~~
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L74
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:74:20 | 74 | SyntaxFail(SyntaxFailAssertion), | ---------- ^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 74 | SyntaxFail(()), | ~~
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L73
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:73:23 | 73 | SyntaxSuccess(SyntaxSuccessAssertion), | ------------- ^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 73 | SyntaxSuccess(()), | ~~
field `0` is never read: partiql-value/src/variant.rs#L121
warning: field `0` is never read --> partiql-value/src/variant.rs:121:28 | 121 | pub struct VariantIter<'a>(BoxedVariantValueIter<'a>); | ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this struct | = help: consider removing this field = note: `#[warn(dead_code)]` on by default
unused variable: `doc`: partiql-value/src/value/iter.rs#L43
warning: unused variable: `doc` --> partiql-value/src/value/iter.rs:43:33 | 43 | ValueIter::Embedded(doc) => { | ^^^ help: if this is intentional, prefix it with an underscore: `_doc`
unused variable: `doc`: partiql-value/src/value/iter.rs#L23
warning: unused variable: `doc` --> partiql-value/src/value/iter.rs:23:33 | 23 | ValueIter::Embedded(doc) => { | ^^^ help: if this is intentional, prefix it with an underscore: `_doc` | = note: `#[warn(unused_variables)]` on by default
unused import: `Write`: partiql-value/src/variant.rs#L17
warning: unused import: `Write` --> partiql-value/src/variant.rs:17:43 | 17 | use std::fmt::{Debug, Formatter, Pointer, Write}; | ^^^^^
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L164
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:164:13 | 163 | pub struct EvaluationFailAssertion { | ----------------------- field in this struct 164 | pub result: String, | ^^^^^^ | = note: `EvaluationFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L157
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:157:13 | 156 | pub struct EvaluationSuccessAssertion { | -------------------------- field in this struct 157 | pub result: String, | ^^^^^^ | = note: `EvaluationSuccessAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L152
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:152:13 | 151 | pub struct StaticAnalysisFailAssertion { | --------------------------- field in this struct 152 | pub result: String, | ^^^^^^ | = note: `StaticAnalysisFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L147
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:147:13 | 146 | pub struct SyntaxFailAssertion { | ------------------- field in this struct 147 | pub result: String, | ^^^^^^ | = note: `SyntaxFailAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `result` is never read: partiql-conformance-test-generator/src/schema.rs#L142
warning: field `result` is never read --> partiql-conformance-test-generator/src/schema.rs:142:13 | 141 | pub struct SyntaxSuccessAssertion { | ---------------------- field in this struct 142 | pub result: String, | ^^^^^^ | = note: `SyntaxSuccessAssertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L75
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:75:28 | 75 | StaticAnalysisFail(StaticAnalysisFailAssertion), | ------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 75 | StaticAnalysisFail(()), | ~~
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L74
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:74:20 | 74 | SyntaxFail(SyntaxFailAssertion), | ---------- ^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 74 | SyntaxFail(()), | ~~
field `0` is never read: partiql-conformance-test-generator/src/schema.rs#L73
warning: field `0` is never read --> partiql-conformance-test-generator/src/schema.rs:73:23 | 73 | SyntaxSuccess(SyntaxSuccessAssertion), | ------------- ^^^^^^^^^^^^^^^^^^^^^^ | | | field in this variant | = note: `Assertion` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 73 | SyntaxSuccess(()), | ~~
unused imports: `Deserialize` and `Serialize`: partiql-value/src/lib.rs#L30
warning: unused imports: `Deserialize` and `Serialize` --> partiql-value/src/lib.rs:30:13 | 30 | use serde::{Deserialize, Serialize}; | ^^^^^^^^^^^ ^^^^^^^^^
unused import: `Pointer`: partiql-value/src/variant.rs#L17
warning: unused import: `Pointer` --> partiql-value/src/variant.rs:17:34 | 17 | use std::fmt::{Debug, Formatter, Pointer, Write}; | ^^^^^^^
unused import: `List`: partiql-value/src/variant.rs#L9
warning: unused import: `List` --> partiql-value/src/variant.rs:9:13 | 9 | use crate::{List, NullSortedValue, Value}; | ^^^^
unused import: `std::borrow::Cow`: partiql-value/src/sort.rs#L3
warning: unused import: `std::borrow::Cow` --> partiql-value/src/sort.rs:3:5 | 3 | use std::borrow::Cow; | ^^^^^^^^^^^^^^^^
unused imports: `DatumCategory` and `DatumLower`: partiql-value/src/sort.rs#L1
warning: unused imports: `DatumCategory` and `DatumLower` --> partiql-value/src/sort.rs:1:20 | 1 | use crate::datum::{DatumCategory, DatumLower}; | ^^^^^^^^^^^^^ ^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default