From 18466b9035b0ca5706a03cfd81be7a16853f8021 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 28 Aug 2025 16:22:43 -0700 Subject: [PATCH] rust: Fix warnings from newer version of rustc. --- rust/pspp/src/dictionary.rs | 10 +++++----- rust/pspp/src/lex/lexer.rs | 4 ++-- rust/pspp/src/output/pivot/output.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rust/pspp/src/dictionary.rs b/rust/pspp/src/dictionary.rs index 923f289b3e..84d86da398 100644 --- a/rust/pspp/src/dictionary.rs +++ b/rust/pspp/src/dictionary.rs @@ -467,23 +467,23 @@ impl Dictionary { assert!(self.try_rename_var(index, new_name).is_ok()); } - pub fn output_variables(&self) -> OutputVariables { + pub fn output_variables(&self) -> OutputVariables<'_> { OutputVariables::new(self) } - pub fn output_value_labels(&self) -> OutputValueLabels { + pub fn output_value_labels(&self) -> OutputValueLabels<'_> { OutputValueLabels::new(self) } - pub fn output_variable_sets(&self) -> OutputVariableSets { + pub fn output_variable_sets(&self) -> OutputVariableSets<'_> { OutputVariableSets::new(self) } - pub fn output_mrsets(&self) -> OutputMrsets { + pub fn output_mrsets(&self) -> OutputMrsets<'_> { OutputMrsets::new(self) } - pub fn output_attributes(&self) -> OutputAttributes { + pub fn output_attributes(&self) -> OutputAttributes<'_> { OutputAttributes::new(self) } diff --git a/rust/pspp/src/lex/lexer.rs b/rust/pspp/src/lex/lexer.rs index 860a44a33e..62a30b0d1e 100644 --- a/rust/pspp/src/lex/lexer.rs +++ b/rust/pspp/src/lex/lexer.rs @@ -187,7 +187,7 @@ impl StripNewline for str { } } -fn ellipsize(s: &str) -> Cow { +fn ellipsize(s: &str) -> Cow<'_, str> { if s.width() > 64 { let mut out = String::new(); let mut width = 0; @@ -423,7 +423,7 @@ impl TokenSlice { self.len() == 0 } - pub fn iter(&self) -> TokenSliceIter { + pub fn iter(&self) -> TokenSliceIter<'_> { TokenSliceIter::new(self) } diff --git a/rust/pspp/src/output/pivot/output.rs b/rust/pspp/src/output/pivot/output.rs index aafaa9865b..3a6f24cbeb 100644 --- a/rust/pspp/src/output/pivot/output.rs +++ b/rust/pspp/src/output/pivot/output.rs @@ -49,7 +49,7 @@ impl AxisEnumeration { &self.indexes[start..start + self.stride] } - fn iter(&self) -> AxisEnumerationIter { + fn iter(&self) -> AxisEnumerationIter<'_> { AxisEnumerationIter { enumeration: self, position: 0, -- 2.30.2