From: Ben Pfaff Date: Thu, 28 Aug 2025 23:22:43 +0000 (-0700) Subject: rust: Fix warnings from newer version of rustc. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18466b9035b0ca5706a03cfd81be7a16853f8021;p=pspp rust: Fix warnings from newer version of rustc. --- 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,