mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-22 21:55:15 +00:00
Do something wrong instead of crashing for partitions pointing at files
This commit is contained in:
@@ -32,8 +32,7 @@ fn file_to_instances(
|
|||||||
|
|
||||||
// This is placeholder logic; this whole function is!
|
// This is placeholder logic; this whole function is!
|
||||||
let (class_name, property_key, name) = {
|
let (class_name, property_key, name) = {
|
||||||
// TODO: Root instances have an empty route
|
let file_name = route.route.last().unwrap_or(&route.partition);
|
||||||
let file_name = route.route.last().unwrap();
|
|
||||||
|
|
||||||
fn strip_suffix<'a>(source: &'a str, suffix: &'static str) -> &'a str {
|
fn strip_suffix<'a>(source: &'a str, suffix: &'static str) -> &'a str {
|
||||||
&source[..source.len() - suffix.len()]
|
&source[..source.len() - suffix.len()]
|
||||||
|
|||||||
Reference in New Issue
Block a user