rust: Fix warnings from newer version of rustc.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 28 Aug 2025 23:22:43 +0000 (16:22 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 28 Aug 2025 23:22:43 +0000 (16:22 -0700)
rust/pspp/src/dictionary.rs
rust/pspp/src/lex/lexer.rs
rust/pspp/src/output/pivot/output.rs

index 923f289b3e57b1c190f264cb810201d03be016e8..84d86da3985dfe5f13676c0e3504a144bf365ea1 100644 (file)
@@ -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)
     }
 
index 860a44a33e1f17263447f612fadc87250beacdab..62a30b0d1e422155e495f6d22036a29b995ae47c 100644 (file)
@@ -187,7 +187,7 @@ impl StripNewline for str {
     }
 }
 
-fn ellipsize(s: &str) -> Cow<str> {
+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)
     }
 
index aafaa9865b0a71a889c9e4e14c81cd660dd33d51..3a6f24cbebb3dcd40757da6c4882c93a7d7d81b9 100644 (file)
@@ -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,