From 5be898e7e76e2410485fab1e5b3de6bc39452571 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 1 Sep 2022 09:34:44 -0700 Subject: [PATCH] Use `Option::as_deref` as appropriate. --- src/back/spv/writer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/back/spv/writer.rs b/src/back/spv/writer.rs index 2b4a72303f..0bb937c2e7 100644 --- a/src/back/spv/writer.rs +++ b/src/back/spv/writer.rs @@ -346,7 +346,7 @@ impl Writer { ShaderStage::Fragment => true, }; let id = if let Some(ref binding) = argument.binding { - let name = argument.name.as_ref().map(AsRef::as_ref); + let name = argument.name.as_deref(); let varying_id = self.write_varying( ir_module, @@ -369,7 +369,7 @@ impl Writer { let mut constituent_ids = Vec::with_capacity(members.len()); for member in members { let type_id = self.get_type_id(LookupType::Handle(member.ty)); - let name = member.name.as_ref().map(AsRef::as_ref); + let name = member.name.as_deref(); let binding = member.binding.as_ref().unwrap(); let varying_id = self.write_varying( ir_module, @@ -456,7 +456,7 @@ impl Writer { { for member in members { let type_id = self.get_type_id(LookupType::Handle(member.ty)); - let name = member.name.as_ref().map(AsRef::as_ref); + let name = member.name.as_deref(); let binding = member.binding.as_ref().unwrap(); has_point_size |= *binding == crate::Binding::BuiltIn(crate::BuiltIn::PointSize);