feat: add CLI to drive I/O testing #54
GitHub Actions / clippy
failed
Nov 25, 2024 in 0s
clippy
3 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 3 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
Annotations
Check failure on line 695 in rdftk_io/src/turtle/writer.rs
github-actions / clippy
passing a unit value to a function
error: passing a unit value to a function
--> rdftk_io/src/turtle/writer.rs:662:9
|
662 | / Ok(if let Some(literal) = literal.as_literal() {
663 | | match literal.data_type() {
664 | | Some(DataType::Iri) => {
665 | | let iri = Iri::parse(literal.lexical_form())?;
... |
694 | | panic!("ERROR: this is not a literal: {:?}", literal)
695 | | })
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `-D clippy::unit-arg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unit_arg)]`
help: move the expression in front of the call and replace it with the unit literal `()`
|
662 ~ if let Some(literal) = literal.as_literal() {
663 + match literal.data_type() {
664 + Some(DataType::Iri) => {
665 + let iri = Iri::parse(literal.lexical_form())?;
666 + self.write_iri(w, graph, &iri)?
667 + }
668 + Some(DataType::Boolean)
669 + | Some(DataType::Long)
670 + | Some(DataType::Int)
671 + | Some(DataType::Short)
672 + | Some(DataType::Byte)
673 + | Some(DataType::UnsignedLong)
674 + | Some(DataType::UnsignedInt)
675 + | Some(DataType::UnsignedShort)
676 + | Some(DataType::UnsignedByte)
677 + | Some(DataType::Float)
678 + | Some(DataType::Double)
679 + | Some(DataType::Decimal) => write!(w, "{}", literal.lexical_form())?,
680 + _ => {
681 + write!(w, "{:?}", literal.lexical_form())?;
682 + match (literal.data_type(), literal.language()) {
683 + (Some(data_type), None) => {
684 + write!(w, "{DATATYPE_PREFIX}")?;
685 + let iri = data_type.as_iri();
686 + self.write_iri(w, graph, iri)?;
687 + }
688 + (None, Some(language)) => write!(w, "{LANGUAGE_PREFIX}{}", language)?,
689 + _ => (),
690 + }
691 + }
692 + }
693 + } else {
694 + panic!("ERROR: this is not a literal: {:?}", literal)
695 + };
696 + Ok(())
|
Check failure on line 122 in rdftk_io/src/turtle/writer.rs
github-actions / clippy
constant `COLLECTION_END` is never used
error: constant `COLLECTION_END` is never used
--> rdftk_io/src/turtle/writer.rs:122:7
|
122 | const COLLECTION_END: &str = ")";
| ^^^^^^^^^^^^^^
Check failure on line 121 in rdftk_io/src/turtle/writer.rs
github-actions / clippy
constant `COLLECTION_START` is never used
error: constant `COLLECTION_START` is never used
--> rdftk_io/src/turtle/writer.rs:121:7
|
121 | const COLLECTION_START: &str = "(";
| ^^^^^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
Loading