Skip to content

Commit 201f14b

Browse files
committed
Make tidy::version::Version copy
1 parent 4bcc828 commit 201f14b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/tools/tidy/src/features.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ fn format_features<'a>(features: &'a Features, family: &'a str) -> impl Iterator
153153
name,
154154
family,
155155
feature.level,
156-
feature.since.as_ref().map_or("None".to_owned(),
157-
|since| since.to_string()))
156+
feature.since.map_or("None".to_owned(),
157+
|since| since.to_string()))
158158
})
159159
}
160160

@@ -265,7 +265,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features {
265265
name,
266266
);
267267
}
268-
prev_since = since.clone();
268+
prev_since = since;
269269
}
270270

271271
let issue_str = parts.next().unwrap().trim();

src/tools/tidy/src/features/version.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::str::FromStr;
22
use std::num::ParseIntError;
33
use std::fmt;
44

5-
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
5+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
66
pub struct Version {
77
parts: [u32; 3],
88
}

0 commit comments

Comments
 (0)