kitgit

tirbofish/dropbear · commit

8d2b167b8aa058139bc3733c552ac95e20e709c4

sigh jarvis, run github actions

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-03-09 11:27

view full diff

diff --git a/Cargo.toml b/Cargo.toml
index 839b008..81c5a3e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -92,7 +92,7 @@ float-derive = "0.1"
 rkyv = "0.8"
 
 [workspace.dependencies.image]
-version = "0.24"
+version = "0.25"
 default-features = false
 features = ["png", "jpeg", "hdr"]
 
diff --git a/crates/dropbear-engine/Cargo.toml b/crates/dropbear-engine/Cargo.toml
index 2fe5667..3f42a2c 100644
--- a/crates/dropbear-engine/Cargo.toml
+++ b/crates/dropbear-engine/Cargo.toml
@@ -44,7 +44,7 @@ dashmap.workspace = true
 typetag.workspace = true
 postcard.workspace = true
 pollster.workspace = true
-image.workspace = true
+image = {workspace = true, features = ["serde"]}
 puffin.workspace = true
 bitflags.workspace = true
 puffin_http.workspace = true
diff --git a/crates/dropbear-engine/src/model.rs b/crates/dropbear-engine/src/model.rs
index d08d88e..0133352 100644
--- a/crates/dropbear-engine/src/model.rs
+++ b/crates/dropbear-engine/src/model.rs
@@ -1024,7 +1024,21 @@ impl Model {
         puffin::profile_function!(label.unwrap_or("unlabelled model"));
         let mut registry = registry.write();
 
-        let model_label = label.unwrap_or("No named model");
+        let model_label = label
+            .map(ToString::to_string)
+            .or_else(|| {
+                optional_resref
+                    .as_ref()
+                    .and_then(ResourceReference::as_uri)
+                    .and_then(|uri| uri.rsplit('/').next())
+                    .map(|name| {
+                        name.rsplit_once('.')
+                            .map(|(stem, _)| stem)
+                            .unwrap_or(name)
+                            .to_string()
+                    })
+            })
+            .unwrap_or_else(|| "No named model".to_string());

Large diffs are not rendered by default. Showing the first 50 of 660 lines. Show full diff