Skip to content

Commit 58aba55

Browse files
committed
Fix 'elided lifetimes' warning
``` error: hidden lifetime parameters in types are deprecated --> library/stdarch/crates/std_detect/src/detect/os/linux/cpuinfo.rs:20:48 | 20 | pub(crate) fn field(&self, field: &str) -> CpuInfoField { | ^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>` | = note: `-D elided-lifetimes-in-paths` implied by `-D warnings` ``` This lint is allow by default, which is why this wasn't spotted earlier.
1 parent 15babf5 commit 58aba55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/std_detect/src/detect/os/linux/cpuinfo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl CpuInfo {
1717
})
1818
}
1919
/// Returns the value of the cpuinfo `field`.
20-
pub(crate) fn field(&self, field: &str) -> CpuInfoField {
20+
pub(crate) fn field(&self, field: &str) -> CpuInfoField<'_> {
2121
for l in self.raw.lines() {
2222
if l.trim().starts_with(field) {
2323
return CpuInfoField::new(l.split(": ").nth(1));

0 commit comments

Comments
 (0)