From 63c274e7f6aa3a8c3f43abb91935ec924a186f73 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 15 Nov 2021 16:59:49 +0100 Subject: Make clippy happier and remove `Str` --- src/eval/function.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/eval/function.rs') diff --git a/src/eval/function.rs b/src/eval/function.rs index cbbc0b36..c83d8b2b 100644 --- a/src/eval/function.rs +++ b/src/eval/function.rs @@ -1,7 +1,7 @@ use std::fmt::{self, Debug, Formatter, Write}; use std::rc::Rc; -use super::{Cast, EvalContext, Str, Value}; +use super::{Cast, EvalContext, Value}; use crate::diag::{At, TypResult}; use crate::syntax::{Span, Spanned}; use crate::util::EcoString; @@ -52,7 +52,10 @@ impl Debug for Function { impl PartialEq for Function { fn eq(&self, other: &Self) -> bool { // We cast to thin pointers for comparison. - Rc::as_ptr(&self.0) as *const () == Rc::as_ptr(&other.0) as *const () + std::ptr::eq( + Rc::as_ptr(&self.0) as *const (), + Rc::as_ptr(&other.0) as *const (), + ) } } @@ -71,7 +74,7 @@ pub struct Arg { /// The span of the whole argument. pub span: Span, /// The name of the argument (`None` for positional arguments). - pub name: Option, + pub name: Option, /// The value of the argument. pub value: Spanned, } @@ -173,7 +176,7 @@ impl Args { } /// Reinterpret these arguments as actually being a dictionary key. - pub fn into_key(self) -> TypResult { + pub fn into_key(self) -> TypResult { self.into_castable("key") } -- cgit v1.2.3