diff --git a/.cargo/config.toml b/.cargo/config.toml index e248c473..09e6f6fe 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -5,8 +5,8 @@ rustflags = [ "-Wunsafe-code", "-Wunused-lifetimes", "-Wunused-qualifications", - # TODO: 1.63+ "-Wclippy::as-underscore", - # TODO: 1.65+ ""-Wclippy::bool-to-int-with-if", + "-Wclippy::as-underscore", + "-Wclippy::bool-to-int-with-if", "-Wclippy::borrow-as-ptr", "-Wclippy::case-sensitive-file-extension-comparisons", "-Wclippy::cast-lossless", @@ -23,11 +23,11 @@ rustflags = [ "-Wclippy::decimal-literal-representation", "-Wclippy::default-trait-access", "-Wclippy::default-union-representation", - # TODO: 1.61+ "-Wclippy::deref-by-slicing", - # TODO: 1.63+ "-Wclippy::doc-link-with-quotes", - # TODO: 1.62+ "-Wclippy::empty-drop", + "-Wclippy::deref-by-slicing", + "-Wclippy::doc-link-with-quotes", + "-Wclippy::empty-drop", "-Wclippy::empty-enum", - # TODO: on major version "-Wclippy::empty-structs-with-brackets", + "-Wclippy::empty-structs-with-brackets", "-Wclippy::enum-glob-use", "-Wclippy::exit", "-Wclippy::expect-used", @@ -38,7 +38,7 @@ rustflags = [ "-Wclippy::filter-map-next", "-Wclippy::flat-map-option", "-Wclippy::fn-to-numeric-cast-any", - # TODO: 1.62+ "-Wclippy::format-push-string", + "-Wclippy::format-push-string", "-Wclippy::from-iter-instead-of-collect", "-Wclippy::get-unwrap", "-Wclippy::if-not-else", @@ -62,10 +62,10 @@ rustflags = [ "-Wclippy::lossy-float-literal", "-Wclippy::macro-use-imports", "-Wclippy::manual-assert", - # TODO: 1.65+ "-Wclippy::manual-instant-elapsed", + "-Wclippy::manual-instant-elapsed", # TODO: 1.67+ "-Wclippy::manual-let-else", "-Wclippy::manual-ok-or", - # TODO: 1.65+ "-Wclippy::manual-string-new", + "-Wclippy::manual-string-new", "-Wclippy::many-single-char-names", "-Wclippy::map-unwrap-or", "-Wclippy::match-bool", @@ -73,7 +73,7 @@ rustflags = [ "-Wclippy::match-wildcard-for-single-variants", "-Wclippy::maybe-infinite-iter", "-Wclippy::mem-forget", - # TODO: 1.63+ "-Wclippy::mismatching-type-param-order", + "-Wclippy::mismatching-type-param-order", "-Wclippy::multiple-inherent-impl", "-Wclippy::mut-mut", "-Wclippy::mutex-atomic", @@ -99,7 +99,7 @@ rustflags = [ "-Wclippy::rest-pat-in-fully-bound-structs", "-Wclippy::return-self-not-must-use", "-Wclippy::same-functions-in-if-condition", - # TODO: strange failure on 1.60 "-Wclippy::same-name-method", + "-Wclippy::same-name-method", # TODO: 1.68+ "-Wclippy::semicolon-outside-block", "-Wclippy::single-match-else", "-Wclippy::stable-sort-primitive", @@ -117,7 +117,7 @@ rustflags = [ "-Wclippy::unimplemented", # TODO: 1.66+ "-Wclippy::uninlined-format-args", # TODO: 1.70+ "-Wclippy::unnecessary-box-returns", - # TODO: 1.61+ "-Wclippy::unnecessary-join", + "-Wclippy::unnecessary-join", # TODO: 1.67+ "-Wclippy::unnecessary-safety-comment", # TODO: 1.67+ "-Wclippy::unnecessary-safety-doc", "-Wclippy::unnecessary-self-imports", diff --git a/js/src/model.rs b/js/src/model.rs index 4929068f..753ab66e 100644 --- a/js/src/model.rs +++ b/js/src/model.rs @@ -302,7 +302,7 @@ impl From for Term { #[wasm_bindgen(js_name = DefaultGraph)] #[derive(Eq, PartialEq, Debug, Clone, Hash)] -pub struct JsDefaultGraph {} +pub struct JsDefaultGraph; #[wasm_bindgen(js_class = DefaultGraph)] impl JsDefaultGraph { @@ -313,7 +313,7 @@ impl JsDefaultGraph { #[wasm_bindgen(getter)] pub fn value(&self) -> String { - "".to_owned() + String::new() } #[wasm_bindgen(js_name = toString)] @@ -393,7 +393,7 @@ impl JsQuad { #[wasm_bindgen(getter)] pub fn value(&self) -> String { - "".to_owned() + String::new() } #[wasm_bindgen(getter = subject)] diff --git a/lib/oxrdf/src/blank_node.rs b/lib/oxrdf/src/blank_node.rs index 938461e9..5b9172c2 100644 --- a/lib/oxrdf/src/blank_node.rs +++ b/lib/oxrdf/src/blank_node.rs @@ -343,7 +343,7 @@ fn to_integer_id(id: &str) -> Option { /// An error raised during [`BlankNode`] IDs validation. #[derive(Debug)] -pub struct BlankNodeIdParseError {} +pub struct BlankNodeIdParseError; impl fmt::Display for BlankNodeIdParseError { #[inline] diff --git a/lib/oxrdf/src/interning.rs b/lib/oxrdf/src/interning.rs index 02d229e0..4b7b8705 100644 --- a/lib/oxrdf/src/interning.rs +++ b/lib/oxrdf/src/interning.rs @@ -479,7 +479,7 @@ impl InternedTriple { } #[derive(Default)] -struct IdentityHasherBuilder {} +struct IdentityHasherBuilder; impl BuildHasher for IdentityHasherBuilder { type Hasher = IdentityHasher; diff --git a/lib/oxrdf/src/variable.rs b/lib/oxrdf/src/variable.rs index e1c0d3af..af055bb9 100644 --- a/lib/oxrdf/src/variable.rs +++ b/lib/oxrdf/src/variable.rs @@ -219,7 +219,7 @@ fn validate_variable_identifier(id: &str) -> Result<(), VariableNameParseError> /// An error raised during [`Variable`] name validation. #[derive(Debug)] -pub struct VariableNameParseError {} +pub struct VariableNameParseError; impl fmt::Display for VariableNameParseError { #[inline] diff --git a/lib/src/sparql/http/dummy.rs b/lib/src/sparql/http/dummy.rs index 0517456b..3eb47e62 100644 --- a/lib/src/sparql/http/dummy.rs +++ b/lib/src/sparql/http/dummy.rs @@ -3,7 +3,7 @@ use std::io::{Empty, Error, ErrorKind, Result}; use std::time::Duration; -pub struct Client {} +pub struct Client; impl Client { pub fn new(_timeout: Option, _redirection_limit: usize) -> Self {