Skip to content

Commit bc1bf5f

Browse files
committed
nightly clippy
1 parent 1450a19 commit bc1bf5f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

crates/eure-schema/src/validate/reference.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,10 @@ impl<'a, 'doc, 's> DocumentParser<'doc> for ReferenceValidator<'a, 'doc, 's> {
3232
let node_id = parse_ctx.node_id();
3333

3434
// Cross-schema references not supported
35-
if self.type_ref.namespace.is_some() {
35+
if let Some(namespace) = &self.type_ref.namespace {
3636
self.ctx
3737
.record_error(ValidationError::UndefinedTypeReference {
38-
name: format!(
39-
"{}.{}",
40-
self.type_ref.namespace.as_ref().unwrap(),
41-
self.type_ref.name
42-
),
38+
name: format!("{}.{}", namespace, self.type_ref.name),
4339
path: self.ctx.path(),
4440
node_id,
4541
schema_node_id: self.schema_node_id,

0 commit comments

Comments
 (0)