Skip to content

Commit 6f6ba34

Browse files
add conversion from address reference to muxed address
(cherry picked from commit 5991077)
1 parent 1e75481 commit 6f6ba34

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

soroban-sdk/src/muxed_address.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ impl TryFromVal<Env, &MuxedAddress> for Val {
161161

162162
impl From<Address> for MuxedAddress {
163163
fn from(address: Address) -> Self {
164+
(&address).into()
165+
}
166+
}
167+
168+
impl From<&Address> for MuxedAddress {
169+
fn from(address: &Address) -> Self {
164170
address
165171
.as_object()
166172
.try_into_val(address.env())

0 commit comments

Comments
 (0)