From 0123280f6455ca5b3f177a6387a687a0e909c494 Mon Sep 17 00:00:00 2001 From: Tpt Date: Tue, 15 Mar 2022 19:53:44 +0100 Subject: [PATCH] Do not make compilation fails on lints Creates problems on untested architectures and rust version upgrades --- lib/oxrdf/src/blank_node.rs | 1 - lib/oxrdf/src/interning.rs | 2 -- lib/oxrdf/src/lib.rs | 11 +---------- lib/oxrdf/src/parser.rs | 1 - lib/oxrdf/src/variable.rs | 1 - lib/sparesults/src/lib.rs | 13 +------------ lib/spargebra/src/lib.rs | 11 +---------- lib/src/io/write.rs | 2 -- lib/src/lib.rs | 17 ++++++----------- python/src/lib.rs | 10 ---------- server/src/main.rs | 11 ----------- testsuite/src/lib.rs | 10 ---------- 12 files changed, 9 insertions(+), 81 deletions(-) diff --git a/lib/oxrdf/src/blank_node.rs b/lib/oxrdf/src/blank_node.rs index ab00ae61..76d161c3 100644 --- a/lib/oxrdf/src/blank_node.rs +++ b/lib/oxrdf/src/blank_node.rs @@ -342,7 +342,6 @@ fn to_integer_id(id: &str) -> Option { } /// An error raised during [`BlankNode`] IDs validation. -#[allow(missing_copy_implementations)] #[derive(Debug)] pub struct BlankNodeIdParseError {} diff --git a/lib/oxrdf/src/interning.rs b/lib/oxrdf/src/interning.rs index f07ab567..22e84547 100644 --- a/lib/oxrdf/src/interning.rs +++ b/lib/oxrdf/src/interning.rs @@ -172,7 +172,6 @@ impl InternedLiteral { } } -#[allow(missing_copy_implementations)] #[derive(Eq, PartialEq, Ord, PartialOrd, Debug, Clone, Hash)] pub enum InternedSubject { NamedNode(InternedNamedNode), @@ -298,7 +297,6 @@ impl InternedGraphName { } } -#[allow(missing_copy_implementations)] #[derive(Eq, PartialEq, Ord, PartialOrd, Debug, Clone, Hash)] pub enum InternedTerm { NamedNode(InternedNamedNode), diff --git a/lib/oxrdf/src/lib.rs b/lib/oxrdf/src/lib.rs index 8a47b470..0a4cdd68 100644 --- a/lib/oxrdf/src/lib.rs +++ b/lib/oxrdf/src/lib.rs @@ -1,14 +1,5 @@ #![doc = include_str!("../README.md")] -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] +#![deny(unsafe_code)] #![doc(test(attr(deny(warnings))))] #![doc(html_favicon_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] #![doc(html_logo_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] diff --git a/lib/oxrdf/src/parser.rs b/lib/oxrdf/src/parser.rs index e9f1d419..4e245db3 100644 --- a/lib/oxrdf/src/parser.rs +++ b/lib/oxrdf/src/parser.rs @@ -375,7 +375,6 @@ fn read_hexa_char(input: &mut Chars<'_>, len: usize) -> Result Result<(), VariableNameParseError> } /// An error raised during [`Variable`] name validation. -#[allow(missing_copy_implementations)] #[derive(Debug)] pub struct VariableNameParseError {} diff --git a/lib/sparesults/src/lib.rs b/lib/sparesults/src/lib.rs index e5268cb3..7aa1ccee 100644 --- a/lib/sparesults/src/lib.rs +++ b/lib/sparesults/src/lib.rs @@ -1,14 +1,5 @@ #![doc = include_str!("../README.md")] -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] +#![deny(unsafe_code)] #![doc(test(attr(deny(warnings))))] #![doc(html_favicon_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] #![doc(html_logo_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] @@ -165,7 +156,6 @@ impl QueryResultsFormat { /// } /// # Result::<(),sparesults::ParseError>::Ok(()) /// ``` -#[allow(missing_copy_implementations)] pub struct QueryResultsParser { format: QueryResultsFormat, } @@ -361,7 +351,6 @@ impl Iterator for SolutionsReader { /// assert_eq!(buffer, b"{\"head\":{\"vars\":[\"foo\",\"bar\"]},\"results\":{\"bindings\":[{\"foo\":{\"type\":\"literal\",\"value\":\"test\"}}]}}"); /// # std::io::Result::Ok(()) /// ``` -#[allow(missing_copy_implementations)] pub struct QueryResultsSerializer { format: QueryResultsFormat, } diff --git a/lib/spargebra/src/lib.rs b/lib/spargebra/src/lib.rs index d5686cc8..316dc7b1 100644 --- a/lib/spargebra/src/lib.rs +++ b/lib/spargebra/src/lib.rs @@ -1,14 +1,5 @@ #![doc = include_str!("../README.md")] -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] +#![deny(unsafe_code)] #![doc(test(attr(deny(warnings))))] #![doc(html_favicon_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] #![doc(html_logo_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] diff --git a/lib/src/io/write.rs b/lib/src/io/write.rs index 260b1898..af4ebaf0 100644 --- a/lib/src/io/write.rs +++ b/lib/src/io/write.rs @@ -30,7 +30,6 @@ use std::io::{self, Write}; ///assert_eq!(buffer.as_slice(), " .\n".as_bytes()); /// # Result::<_,Box>::Ok(()) /// ``` -#[allow(missing_copy_implementations)] pub struct GraphSerializer { format: GraphFormat, } @@ -173,7 +172,6 @@ impl TripleWriter { ///assert_eq!(buffer.as_slice(), " .\n".as_bytes()); /// # Result::<_,Box>::Ok(()) /// ``` -#[allow(missing_copy_implementations)] pub struct DatasetSerializer { format: DatasetFormat, } diff --git a/lib/src/lib.rs b/lib/src/lib.rs index df493c06..b488cac9 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -1,18 +1,13 @@ #![doc = include_str!("../README.md")] -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] -#![doc(test(attr(deny(warnings))))] #![doc(html_favicon_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] #![doc(html_logo_url = "https://raw.githubusercontent.com/oxigraph/oxigraph/master/logo.svg")] +#![doc(test(attr(deny(warnings))))] +#![deny(unsafe_code)] #![warn( + trivial_casts, + trivial_numeric_casts, + unused_lifetimes, + unused_qualifications, clippy::cast_lossless, clippy::cast_possible_truncation, clippy::cast_possible_wrap, diff --git a/python/src/lib.rs b/python/src/lib.rs index b64d2e92..170d78b8 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -1,13 +1,3 @@ -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] - mod io; mod model; mod sparql; diff --git a/server/src/main.rs b/server/src/main.rs index 8fc23913..e555ecdc 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,14 +1,3 @@ -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] - use clap::{Parser, Subcommand}; use flate2::read::MultiGzDecoder; use oxhttp::model::{Body, HeaderName, HeaderValue, Request, Response, Status}; diff --git a/testsuite/src/lib.rs b/testsuite/src/lib.rs index ac160782..506e36ce 100644 --- a/testsuite/src/lib.rs +++ b/testsuite/src/lib.rs @@ -1,14 +1,4 @@ //! Implementation of [W3C RDF tests](http://w3c.github.io/rdf-tests/) to tests Oxigraph conformance. -#![deny( - future_incompatible, - nonstandard_style, - rust_2018_idioms, - missing_copy_implementations, - trivial_casts, - trivial_numeric_casts, - unsafe_code, - unused_qualifications -)] pub mod evaluator; pub mod files;