Skip to content

Commit 2f5b081

Browse files
committed
Loosen lifetime restrictions on slices
1 parent 8b46dab commit 2f5b081

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

‎src/lib.rs‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ extern crate postgres;
66
externcrate byteorder;
77

88
use std::mem;
9-
use std::slice;
10-
use std::vec;
119

1210
#[doc(inline)]
1311
pubuse base::ArrayBase;
@@ -81,14 +79,14 @@ trait InternalMutableArray<T>: MutableArray<T>{
8179
fnraw_get_mut<'a>(&'amutself,idx:usize,size:usize) -> &'amutT;
8280
}
8381

84-
enumArrayParent<'parent,T:'static>{
85-
Slice(&'parentArraySlice<'static,T>),
86-
MutSlice(&'parentMutArraySlice<'static,T>),
82+
enumArrayParent<'parent,T:'parent>{
83+
Slice(&'parentArraySlice<'parent,T>),
84+
MutSlice(&'parentMutArraySlice<'parent,T>),
8785
Base(&'parentArrayBase<T>),
8886
}
8987

9088
/// An immutable slice of a multi-dimensional array
91-
pubstructArraySlice<'parent,T:'static>{
89+
pubstructArraySlice<'parent,T:'parent>{
9290
parent:ArrayParent<'parent,T>,
9391
idx:usize,
9492
}
@@ -133,13 +131,13 @@ impl<'parent, T> InternalArray<T> for ArraySlice<'parent, T>{
133131
}
134132
}
135133

136-
enumMutArrayParent<'parent,T:'static>{
137-
Slice(&'parentmutMutArraySlice<'static,T>),
134+
enumMutArrayParent<'parent,T:'parent>{
135+
Slice(&'parentmutMutArraySlice<'parent,T>),
138136
Base(&'parentmutArrayBase<T>),
139137
}
140138

141139
/// A mutable slice of a multi-dimensional array
142-
pubstructMutArraySlice<'parent,T:'static>{
140+
pubstructMutArraySlice<'parent,T:'parent>{
143141
parent:MutArrayParent<'parent,T>,
144142
idx:usize,
145143
}

0 commit comments

Comments
(0)