Skip to content

Commit edf23b3

Browse files
committed
into
1 parent 1e23b42 commit edf23b3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/generate/register.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,8 @@ pub fn render(
5757
pub struct R {
5858
bits: #rty,
5959
}
60-
impl core::ops::Deref for R {
61-
type Target = #rty;
62-
fn deref(&self) -> &Self::Target {
63-
&self.bits
64-
}
65-
}
66-
impl vcell::FromBits<#rty> for R {
67-
fn from_bits(bits: #rty) -> Self {
60+
impl core::convert::Into<R> for #rty {
61+
fn into(bits: #rty) -> Self {
6862
Self { bits }
6963
}
7064
}
@@ -74,7 +68,7 @@ pub fn render(
7468
/// Value of the register as raw bits
7569
#[inline]
7670
pub fn bits(&self) -> #rty {
77-
**self
71+
self.bits
7872
}
7973
});
8074
}
@@ -91,8 +85,8 @@ pub fn render(
9185
&self.bits
9286
}
9387
}
94-
impl vcell::FromBits<#rty> for W {
95-
fn from_bits(bits: #rty) -> Self {
88+
impl core::convert::Into<W> for #rty {
89+
fn into(bits: #rty) -> Self {
9690
Self { bits }
9791
}
9892
}

0 commit comments

Comments
 (0)