From 0e33aa78db74c5640812936d184052b4793789a4 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 10 Aug 2024 21:57:29 -0700 Subject: [PATCH] Make Generics method documentation less redundant with signatures --- src/generics.rs | 48 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/src/generics.rs b/src/generics.rs index 42bc16790..6e700ea96 100644 --- a/src/generics.rs +++ b/src/generics.rs @@ -103,68 +103,32 @@ impl Default for Generics { } impl Generics { - /// Returns an - /// Iterator<Item = &LifetimeParam> - /// over the lifetime parameters in `self.params`. + /// Iterator over the lifetime parameters in `self.params`. pub fn lifetimes(&self) -> impl Iterator { Lifetimes(self.params.iter()) } - /// Returns an - /// Iterator<Item = &mut LifetimeParam> - /// over the lifetime parameters in `self.params`. + /// Iterator over the lifetime parameters in `self.params`. pub fn lifetimes_mut(&mut self) -> impl Iterator { LifetimesMut(self.params.iter_mut()) } - /// Returns an - /// Iterator<Item = &TypeParam> - /// over the type parameters in `self.params`. + /// Iterator over the type parameters in `self.params`. pub fn type_params(&self) -> impl Iterator { TypeParams(self.params.iter()) } - /// Returns an - /// Iterator<Item = &mut TypeParam> - /// over the type parameters in `self.params`. + /// Iterator over the type parameters in `self.params`. pub fn type_params_mut(&mut self) -> impl Iterator { TypeParamsMut(self.params.iter_mut()) } - /// Returns an - /// Iterator<Item = &ConstParam> - /// over the constant parameters in `self.params`. + /// Iterator over the constant parameters in `self.params`. pub fn const_params(&self) -> impl Iterator { ConstParams(self.params.iter()) } - /// Returns an - /// Iterator<Item = &mut ConstParam> - /// over the constant parameters in `self.params`. + /// Iterator over the constant parameters in `self.params`. pub fn const_params_mut(&mut self) -> impl Iterator { ConstParamsMut(self.params.iter_mut()) }