Optimizations
This commit is contained in:
parent
d5dd02356b
commit
c453f2eb0c
|
@ -39,6 +39,7 @@ impl From<InvalidTag> for crate::error::Error {
|
||||||
|
|
||||||
impl TryFrom<u8> for Tag {
|
impl TryFrom<u8> for Tag {
|
||||||
type Error = InvalidTag;
|
type Error = InvalidTag;
|
||||||
|
#[inline(always)]
|
||||||
fn try_from(v: u8) -> Result<Self, Self::Error> {
|
fn try_from(v: u8) -> Result<Self, Self::Error> {
|
||||||
match v {
|
match v {
|
||||||
0x80 => Ok(Self::False),
|
0x80 => Ok(Self::False),
|
||||||
|
@ -65,6 +66,7 @@ impl TryFrom<u8> for Tag {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<Tag> for u8 {
|
impl From<Tag> for u8 {
|
||||||
|
#[inline(always)]
|
||||||
fn from(v: Tag) -> Self {
|
fn from(v: Tag) -> Self {
|
||||||
match v {
|
match v {
|
||||||
Tag::False => 0x80,
|
Tag::False => 0x80,
|
||||||
|
|
|
@ -1234,7 +1234,7 @@ impl<D: Domain> NestedValue for PlainValue<D> {
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn annotations(&self) -> Option<&Annotations<Self>> {
|
fn annotations(&self) -> Option<&Annotations<Self>> {
|
||||||
self.0.0.as_ref()
|
if let Some(b) = &self.0.0 { Some(b) } else { None }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -1284,7 +1284,7 @@ impl<D: Domain> NestedValue for RcValue<D> {
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn annotations(&self) -> Option<&Annotations<Self>> {
|
fn annotations(&self) -> Option<&Annotations<Self>> {
|
||||||
self.0.0.as_ref()
|
if let Some(b) = &self.0.0 { Some(b) } else { None }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -1334,7 +1334,7 @@ impl<D: Domain> NestedValue for ArcValue<D> {
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn annotations(&self) -> Option<&Annotations<Self>> {
|
fn annotations(&self) -> Option<&Annotations<Self>> {
|
||||||
self.0.0.as_ref()
|
if let Some(b) = &self.0.0 { Some(b) } else { None }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -1388,7 +1388,7 @@ impl NestedValue for IOValue {
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn annotations(&self) -> Option<&Annotations<Self>> {
|
fn annotations(&self) -> Option<&Annotations<Self>> {
|
||||||
self.0.0.as_ref()
|
if let Some(b) = &self.0.0 { Some(b) } else { None }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|
Loading…
Reference in New Issue