annotations() returns slice rather than Vec ref

This commit is contained in:
Tony Garnock-Jones 2019-10-12 22:36:09 +01:00
parent 54d1e349b3
commit 623bbd0a71
1 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ pub trait NestedValue: Sized + Debug + Clone + Eq + Hash + Ord {
fn boxwrap(self) -> Self::BoxType;
fn boxunwrap(b: &Self::BoxType) -> &Self;
fn annotations(&self) -> &Vec<Self>;
fn annotations(&self) -> &[Self];
fn value(&self) -> &Value<Self>;
fn value_owned(self) -> Value<Self>;
@ -648,7 +648,7 @@ impl NestedValue for PlainValue {
&**b
}
fn annotations(&self) -> &Vec<Self> {
fn annotations(&self) -> &[Self] {
&(self.0).0
}
@ -705,7 +705,7 @@ impl NestedValue for RcValue {
b
}
fn annotations(&self) -> &Vec<Self> {
fn annotations(&self) -> &[Self] {
&(self.0).0
}
@ -768,7 +768,7 @@ impl NestedValue for ArcValue {
b
}
fn annotations(&self) -> &Vec<Self> {
fn annotations(&self) -> &[Self] {
&(self.0).0
}