Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .config/lints.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ allow = [
"clippy::absolute_paths",
"clippy::default_numeric_fallback",
"clippy::impl_trait_in_params",
"clippy::iter_over_hash_type",
"clippy::min_ident_chars",
"clippy::multiple_unsafe_ops_per_block",
"clippy::pattern_type_mismatch",
Expand Down
1 change: 1 addition & 0 deletions apps/hash-graph/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
16 changes: 7 additions & 9 deletions apps/hash-graph/lib/graph/src/ontology/data_type.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::fmt;
use std::fmt::{self, Write};

use serde::{
de::{self, Deserializer, SeqAccess, Visitor},
Deserialize,
Deserialize, Serialize,
};
use utoipa::ToSchema;

Expand Down Expand Up @@ -273,15 +273,13 @@ impl fmt::Display for DataTypeQueryPath<'_> {
Self::Description => fmt.write_str("description"),
Self::Type => fmt.write_str("type"),
Self::AdditionalMetadata => fmt.write_str("additionalMetadata"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
Self::PropertyTypeEdge {
edge_kind, path, ..
} => write!(fmt, "<{edge_kind:?}>.{path}"),
} => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
}
}
}
Expand Down
31 changes: 15 additions & 16 deletions apps/hash-graph/lib/graph/src/ontology/entity_type.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
use std::{fmt, str::FromStr};
use std::{
fmt::{self, Write},
str::FromStr,
};

use serde::{
de::{self, Deserializer, SeqAccess, Visitor},
Deserialize,
Deserialize, Serialize,
};
use utoipa::ToSchema;

Expand Down Expand Up @@ -566,15 +569,13 @@ impl fmt::Display for EntityTypeQueryPath<'_> {
path,
inheritance_depth: None,
} => write!(fmt, "properties.{path}"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
Self::PropertyTypeEdge {
edge_kind, path, ..
} => write!(fmt, "<{edge_kind:?}>.{path}"),
} => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
Self::EntityTypeEdge {
edge_kind: OntologyEdgeKind::InheritsFrom,
path,
Expand Down Expand Up @@ -611,15 +612,13 @@ impl fmt::Display for EntityTypeQueryPath<'_> {
direction: _,
inheritance_depth: None,
} => write!(fmt, "linkDestinations.{path}"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
Self::EntityTypeEdge {
edge_kind, path, ..
} => write!(fmt, "<{edge_kind:?}>.{path}"),
} => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
Self::EntityEdge {
edge_kind: SharedEdgeKind::IsOfType,
path,
Expand Down
40 changes: 17 additions & 23 deletions apps/hash-graph/lib/graph/src/ontology/property_type.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::fmt;
use std::{fmt, fmt::Write};

use serde::{
de::{self, Deserializer, SeqAccess, Visitor},
Deserialize,
Deserialize, Serialize,
};
use utoipa::ToSchema;

Expand Down Expand Up @@ -321,36 +321,30 @@ impl fmt::Display for PropertyTypeQueryPath<'_> {
edge_kind: OntologyEdgeKind::ConstrainsValuesOn,
path,
} => write!(fmt, "dataTypes.{path}"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
Self::DataTypeEdge { edge_kind, path } => write!(fmt, "<{edge_kind:?}>.{path}"),
Self::DataTypeEdge { edge_kind, path } => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
Self::PropertyTypeEdge {
edge_kind: OntologyEdgeKind::ConstrainsPropertiesOn,
path,
..
} => write!(fmt, "propertyTypes.{path}"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
Self::PropertyTypeEdge {
edge_kind, path, ..
} => write!(fmt, "<{edge_kind:?}>.{path}"),
#[expect(
clippy::use_debug,
reason = "We don't have a `Display` impl for `OntologyEdgeKind` and this should \
(a) never happen and (b) be easy to debug if it does happen. In the \
future, this will become a compile-time check"
)]
} => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
Self::EntityTypeEdge {
edge_kind, path, ..
} => write!(fmt, "<{edge_kind:?}>.{path}"),
} => {
fmt.write_char('<')?;
edge_kind.serialize(&mut *fmt)?;
write!(fmt, ">.{path}")
}
Self::AdditionalMetadata => fmt.write_str("additionalMetadata"),
}
}
Expand Down
6 changes: 1 addition & 5 deletions apps/hash-graph/lib/graph/src/store/query/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,8 @@ impl<'p> JsonPath<'p> {
writer.write_char('$')?;
for token in &self.path {
match token {
#[expect(
clippy::use_debug,
reason = "Debug string is escaped, Display string is not"
)]
PathToken::Field(field) => {
write!(writer, ".{field:?}")?;
write!(writer, ".\"{}\"", field.replace('"', "\\\""))?;
}
PathToken::Index(index) => {
write!(writer, "[{index}]")?;
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-graph/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/@local/codec/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/codec/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/@local/hash-authorization/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/hash-authorization/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/@local/hash-graph-types/rust/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/hash-graph-types/rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/@local/hash-validation/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/hash-validation/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
3 changes: 1 addition & 2 deletions libs/@local/hash-validation/src/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ impl<P: Sync> Schema<JsonValue, P> for DataType {
impl Validate<DataType, ()> for JsonValue {
type Error = DataValidationError;

#[expect(clippy::let_underscore_untyped, reason = "false positive")]
async fn validate(&self, schema: &DataType, _: &()) -> Result<(), Report<Self::Error>> {
async fn validate(&self, schema: &DataType, (): &()) -> Result<(), Report<Self::Error>> {
schema.validate_value(self, &()).await
}
}
Expand Down
1 change: 1 addition & 0 deletions libs/@local/status/rust/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/status/rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/@local/temporal-versioning/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/temporal-versioning/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/antsi/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/antsi/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions libs/deer/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/deer/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri']
1 change: 1 addition & 0 deletions libs/error-stack/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/error-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io]
[![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs]
[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-10-30&color=blue)][rust-version]
[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-11-27&color=blue)][rust-version]
[![documentation](https://img.shields.io/docsrs/error-stack)][documentation]
[![license](https://img.shields.io/crates/l/error-stack)][license]
[![discord](https://img.shields.io/discord/840573247803097118)][discord]
Expand Down
2 changes: 1 addition & 1 deletion libs/error-stack/macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[![crates.io](https://img.shields.io/crates/v/error-stack-macros)][crates.io]
[![libs.rs](https://img.shields.io/badge/libs.rs-error--stack--macros-orange)][libs.rs]
[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-10-30&color=blue)][rust-version]
[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-11-27&color=blue)][rust-version]
[![documentation](https://img.shields.io/docsrs/error-stack-macros)][documentation]
[![license](https://img.shields.io/crates/l/error-stack)][license]
[![discord](https://img.shields.io/discord/840573247803097118)][discord]
Expand Down
2 changes: 1 addition & 1 deletion libs/error-stack/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
# Please also update the badges in `README.md`s (`error-stack` and `error-stack-macros`), and `src/lib.rs`
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-src']
2 changes: 1 addition & 1 deletion libs/error-stack/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! [![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io]
//! [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs]
//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-10-30&color=blue)][rust-version]
//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.63.0/nightly-2023-11-27&color=blue)][rust-version]
//! [![discord](https://img.shields.io/discord/840573247803097118)][discord]
//!
//! [crates.io]: https://crates.io/crates/error-stack
Expand Down
1 change: 1 addition & 0 deletions libs/sarif/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion libs/sarif/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions tests/hash-graph-integration/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion tests/hash-graph-integration/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']
1 change: 1 addition & 0 deletions tests/hash-graph-test-data/rust/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ rustflags = [
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::indexing_slicing",
"-Aclippy::iter_over_hash_type",
"-Aclippy::let_underscore_must_use",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand Down
2 changes: 1 addition & 1 deletion tests/hash-graph-test-data/rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-10-30"
channel = "nightly-2023-11-27"
components = ['rustfmt', 'clippy', 'llvm-tools-preview']