Skip to content

Commit 4760efa

Browse files
committed
Rename 'self lifetimes
1 parent be1865f commit 4760efa

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

types/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,9 @@ macro_rules! to_option_impl(
636636
)
637637
)
638638
639-
macro_rules! to_option_impl_self(
639+
macro_rules! to_option_impl_lifetime(
640640
($($oid:pat)|+, $t:ty) => (
641-
impl<'self> ToSql for Option<$t> {
641+
impl<'a> ToSql for Option<$t> {
642642
fn to_sql(&self, ty: &PostgresType) -> (Format, Option<~[u8]>) {
643643
check_types!($($oid)|+, ty)
644644
@@ -681,23 +681,23 @@ to_raw_to_impl!(PgInt4Range, Range<i32>)
681681
to_raw_to_impl!(PgInt8Range, Range<i64>)
682682
to_raw_to_impl!(PgTsRange | PgTstzRange, Range<Timespec>)
683683
684-
impl<'self> ToSql for &'self str {
684+
impl<'a> ToSql for &'a str {
685685
fn to_sql(&self, ty: &PostgresType) -> (Format, Option<~[u8]>) {
686686
check_types!(PgVarchar | PgText | PgCharN, ty)
687687
(Text, Some(self.as_bytes().to_owned()))
688688
}
689689
}
690690
691-
to_option_impl_self!(PgVarchar | PgText | PgCharN, &'self str)
691+
to_option_impl_lifetime!(PgVarchar | PgText | PgCharN, &'a str)
692692
693-
impl<'self> ToSql for &'self [u8] {
693+
impl<'a> ToSql for &'a [u8] {
694694
fn to_sql(&self, ty: &PostgresType) -> (Format, Option<~[u8]>) {
695695
check_types!(PgByteA, ty)
696696
(Binary, Some(self.to_owned()))
697697
}
698698
}
699699
700-
to_option_impl_self!(PgByteA, &'self [u8])
700+
to_option_impl_lifetime!(PgByteA, &'a [u8])
701701
702702
to_raw_to_impl!(PgTimestamp | PgTimestampTZ, Timespec)
703703
to_raw_to_impl!(PgUuid, Uuid)
@@ -755,7 +755,7 @@ to_array_impl!(PgTsRangeArray | PgTstzRangeArray, Range<Timespec>)
755755
to_array_impl!(PgInt8RangeArray, Range<i64>)
756756
to_array_impl!(PgJsonArray, Json)
757757
758-
impl<'self> ToSql for HashMap<~str, Option<~str>> {
758+
impl<'a> ToSql for HashMap<~str, Option<~str>> {
759759
fn to_sql(&self, ty: &PostgresType) -> (Format, Option<~[u8]>) {
760760
check_types!(PgUnknownType { name: ~"hstore", .. }, ty)
761761
let mut buf = MemWriter::new();

types/range.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ impl<S: BoundSided, T: Ord> RangeBound<S, T> {
129129
}
130130
}
131131

132-
struct OptBound<'self, S, T>(&'self Option<RangeBound<S, T>>);
132+
struct OptBound<'a, S, T>(&'a Option<RangeBound<S, T>>);
133133

134-
impl<'self, S: BoundSided, T: Ord> Ord for OptBound<'self, S, T> {
135-
fn lt(&self, other: &OptBound<'self, S, T>) -> bool {
134+
impl<'a, S: BoundSided, T: Ord> Ord for OptBound<'a, S, T> {
135+
fn lt(&self, other: &OptBound<'a, S, T>) -> bool {
136136
match (**self, **other) {
137137
(&None, &None) => false,
138138
(&None, _) => BoundSided::side(None::<S>) == Lower,

0 commit comments

Comments
 (0)