mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 06:47:34 +00:00
add more inline directives to dvec
This commit is contained in:
parent
7905b79156
commit
d1cde18af3
@ -212,13 +212,13 @@ impl extensions<A:copy> for dvec<A> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[doc = "Copy out an individual element"]
|
#[doc = "Copy out an individual element"]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
fn [](idx: uint) -> A {
|
fn [](idx: uint) -> A {
|
||||||
self.get_elt(idx)
|
self.get_elt(idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc = "Copy out an individual element"]
|
#[doc = "Copy out an individual element"]
|
||||||
#[inline]
|
#[inline(always)]
|
||||||
fn get_elt(idx: uint) -> A {
|
fn get_elt(idx: uint) -> A {
|
||||||
self.check_not_borrowed();
|
self.check_not_borrowed();
|
||||||
ret self.data[idx];
|
ret self.data[idx];
|
||||||
|
Loading…
Reference in New Issue
Block a user