Skip to content

feat: better Literal handling in Turtle #88

feat: better Literal handling in Turtle

feat: better Literal handling in Turtle #88

Triggered via push October 16, 2024 03:32
Status Failure
Total duration 2m 36s
Artifacts

rust.yml

on: push
Matrix: Test
Document generation
0s
Document generation
Matrix: Benchmarks
Matrix: Examples
Matrix: Code Coverage
Matrix: Publish (dry-run)
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 20 warnings
passing a unit value to a function: rdftk_io/src/turtle/writer.rs#L570
error: passing a unit value to a function --> rdftk_io/src/turtle/writer.rs:570:9 | 570 | / Ok(if let Some(literal) = literal.as_literal() { 571 | | match literal.data_type() { 572 | | Some(DataType::Iri) => { 573 | | let iri = Iri::parse(literal.lexical_form())?; ... | 602 | | panic!("ERROR: this is not a literal: {:?}", literal) 603 | | }) | |__________^ | = 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 `()` | 570 ~ if let Some(literal) = literal.as_literal() { 571 + match literal.data_type() { 572 + Some(DataType::Iri) => { 573 + let iri = Iri::parse(literal.lexical_form())?; 574 + self.write_iri(w, graph, &iri)? 575 + } 576 + Some(DataType::Boolean) 577 + | Some(DataType::Long) 578 + | Some(DataType::Int) 579 + | Some(DataType::Short) 580 + | Some(DataType::Byte) 581 + | Some(DataType::UnsignedLong) 582 + | Some(DataType::UnsignedInt) 583 + | Some(DataType::UnsignedShort) 584 + | Some(DataType::UnsignedByte) 585 + | Some(DataType::Float) 586 + | Some(DataType::Double) 587 + | Some(DataType::Decimal) => write!(w, "{}", literal.lexical_form())?, 588 + _ => { 589 + write!(w, "{:?}", literal.lexical_form())?; 590 + match (literal.data_type(), literal.language()) { 591 + (Some(data_type), None) => { 592 + write!(w, "^^")?; 593 + let iri = data_type.as_iri(); 594 + self.write_iri(w, graph, iri)?; 595 + } 596 + (None, Some(language)) => write!(w, "@{}", language)?, 597 + _ => (), 598 + } 599 + } 600 + } 601 + } else { 602 + panic!("ERROR: this is not a literal: {:?}", literal) 603 + }; 604 + Ok(()) |
passing a unit value to a function: rdftk_io/src/turtle/writer.rs#L570
error: passing a unit value to a function --> rdftk_io/src/turtle/writer.rs:570:9 | 570 | / Ok(if let Some(literal) = literal.as_literal() { 571 | | match literal.data_type() { 572 | | Some(DataType::Iri) => { 573 | | let iri = Iri::parse(literal.lexical_form())?; ... | 602 | | panic!("ERROR: this is not a literal: {:?}", literal) 603 | | }) | |__________^ | = 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 `()` | 570 ~ if let Some(literal) = literal.as_literal() { 571 + match literal.data_type() { 572 + Some(DataType::Iri) => { 573 + let iri = Iri::parse(literal.lexical_form())?; 574 + self.write_iri(w, graph, &iri)? 575 + } 576 + Some(DataType::Boolean) 577 + | Some(DataType::Long) 578 + | Some(DataType::Int) 579 + | Some(DataType::Short) 580 + | Some(DataType::Byte) 581 + | Some(DataType::UnsignedLong) 582 + | Some(DataType::UnsignedInt) 583 + | Some(DataType::UnsignedShort) 584 + | Some(DataType::UnsignedByte) 585 + | Some(DataType::Float) 586 + | Some(DataType::Double) 587 + | Some(DataType::Decimal) => write!(w, "{}", literal.lexical_form())?, 588 + _ => { 589 + write!(w, "{:?}", literal.lexical_form())?; 590 + match (literal.data_type(), literal.language()) { 591 + (Some(data_type), None) => { 592 + write!(w, "^^")?; 593 + let iri = data_type.as_iri(); 594 + self.write_iri(w, graph, iri)?; 595 + } 596 + (None, Some(language)) => write!(w, "@{}", language)?, 597 + _ => (), 598 + } 599 + } 600 + } 601 + } else { 602 + panic!("ERROR: this is not a literal: {:?}", literal) 603 + }; 604 + Ok(()) |
clippy
Clippy had exited with the 101 exit code
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
rustfmt
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
rustfmt
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/