Skip to content

Commit 307bc7b

Browse files
committed
fix: fix clippy and prost issues
Signed-off-by: Cheng Xu <git@xuc.me>
1 parent 9b46684 commit 307bc7b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

proto/perftools.profiles.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// f9f855b960d01b292a3c2642e263e6156d52631e78e0177fe51416ed5bbecc81 proto/profile.proto
22

3+
// This file is @generated by prost-build.
34
#[allow(clippy::derive_partial_eq_without_eq)]
45
#[derive(Clone, PartialEq, ::prost::Message)]
56
pub struct Profile {

src/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<T: Eq> Bucket<T> {
8080
}
8181
}
8282

83-
pub fn iter(&self) -> BucketIterator<T> {
83+
pub fn iter(&self) -> BucketIterator<'_, T> {
8484
BucketIterator::<T> {
8585
related_bucket: self,
8686
index: 0,

src/frames.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ impl Symbol {
129129
demangle(&String::from_utf8_lossy(self.raw_name())).into_owned()
130130
}
131131

132-
pub fn sys_name(&self) -> Cow<str> {
132+
pub fn sys_name(&self) -> Cow<'_, str> {
133133
String::from_utf8_lossy(self.raw_name())
134134
}
135135

136-
pub fn filename(&self) -> Cow<str> {
136+
pub fn filename(&self) -> Cow<'_, str> {
137137
self.filename
138138
.as_ref()
139139
.map(|name| name.as_os_str().to_string_lossy())

src/profiler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ impl ProfilerGuard<'_> {
198198
}
199199

200200
/// Generate a report
201-
pub fn report(&self) -> ReportBuilder {
201+
pub fn report(&self) -> ReportBuilder<'_> {
202202
ReportBuilder::new(
203203
self.profiler,
204204
self.timer.as_ref().map(Timer::timing).unwrap_or_default(),
205205
)
206206
}
207207
}
208208

209-
impl<'a> Drop for ProfilerGuard<'a> {
209+
impl Drop for ProfilerGuard<'_> {
210210
fn drop(&mut self) {
211211
drop(self.timer.take());
212212

0 commit comments

Comments
 (0)