tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 499HTML 245JavaScript 8Markdown 71218 Sutichaykuna

Add from impl to TaffyStyloStyle

c472dbf31c53694f9a665435c1a969e1786d643f · ruwaq Nico Burns · (2 wata ñawpaq) · tayta 20b284300 · kay commitpi sach'ata qhaway

Semántico sayk'uy · 1

taffy_stylo/src/lib.rs

1 qillqakuna · +6 −0

diff --git a/taffy_stylo/src/lib.rs b/taffy_stylo/src/lib.rs
index 8fff48a99..1b9d13a84 100644
--- a/taffy_stylo/src/lib.rs
+++ b/taffy_stylo/src/lib.rs
@@ -37,6 +37,12 @@ mod stylo {
 
 pub struct TaffyStyloStyle(pub Arc<stylo::ComputedValues>);
 
+impl From<Arc<stylo::ComputedValues>> for TaffyStyloStyle {
+    fn from(value: Arc<stylo::ComputedValues>) -> Self {
+        Self(Arc::clone(&value))
+    }
+}
+
 impl taffy::CoreStyle for TaffyStyloStyle {
     #[inline]
     fn box_generation_mode(&self) -> taffy::BoxGenerationMode {