Skip to content

Commit d733288

Browse files
authored
Simpler lifetime syntax to improve readability (#3727)
1 parent 5ff7f1a commit d733288

328 files changed

Lines changed: 5874 additions & 5927 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/libs/bindgen/src/config/cfg.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub struct Cfg {
3737
}
3838

3939
impl Cfg {
40-
pub fn new(dependencies: &TypeMap, config: &Config<'_>) -> Self {
40+
pub fn new(dependencies: &TypeMap, config: &Config) -> Self {
4141
let features: BTreeSet<&'static str> = dependencies
4242
.keys()
4343
.filter_map(|tn| {
@@ -52,7 +52,7 @@ impl Cfg {
5252
Self { features }
5353
}
5454

55-
pub fn difference(&self, dependencies: &TypeMap, config: &Config<'_>) -> Self {
55+
pub fn difference(&self, dependencies: &TypeMap, config: &Config) -> Self {
5656
let mut difference = Self::new(dependencies, config);
5757

5858
for feature in &self.features {
@@ -62,7 +62,7 @@ impl Cfg {
6262
difference
6363
}
6464

65-
pub fn write(&self, config: &Config<'_>, not: bool) -> TokenStream {
65+
pub fn write(&self, config: &Config, not: bool) -> TokenStream {
6666
if !config.package {
6767
return quote! {};
6868
}

crates/libs/bindgen/src/derive_writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::*;
33
pub struct DeriveWriter(BTreeSet<String>);
44

55
impl DeriveWriter {
6-
pub fn new(config: &Config<'_>, type_name: TypeName) -> Self {
6+
pub fn new(config: &Config, type_name: TypeName) -> Self {
77
let mut derive = BTreeSet::new();
88
derive.extend(config.derive.get(type_name));
99
Self(derive)

crates/libs/bindgen/src/guid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct GUID(
1313
);
1414

1515
impl std::fmt::Display for GUID {
16-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1717
write!(
1818
f,
1919
"{:08x?}-{:04x?}-{:04x?}-{:02x?}{:02x?}-{:02x?}{:02x?}{:02x?}{:02x?}{:02x?}{:02x?}",

crates/libs/bindgen/src/tables/attribute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for Attribute {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("Attribute").field(&self.name()).finish()
66
}
77
}

crates/libs/bindgen/src/tables/class_layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for ClassLayout {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("ClassLayout")
66
.field(&self.packing_size())
77
.finish()

crates/libs/bindgen/src/tables/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for Constant {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("Constant").field(&self.value()).finish()
66
}
77
}

crates/libs/bindgen/src/tables/field.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for Field {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("Field").field(&self.name()).finish()
66
}
77
}

crates/libs/bindgen/src/tables/generic_param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for GenericParam {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("GenericParam").field(&self.name()).finish()
66
}
77
}

crates/libs/bindgen/src/tables/impl_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for ImplMap {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("ImplMap").field(&self.import_name()).finish()
66
}
77
}

crates/libs/bindgen/src/tables/interface_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

33
impl std::fmt::Debug for InterfaceImpl {
4-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4+
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
55
f.debug_tuple("InterfaceImpl").field(&self.0).finish()
66
}
77
}

0 commit comments

Comments
 (0)