diff --git a/rbx-dom b/rbx-dom index 188dc9da..bd865f3b 160000 --- a/rbx-dom +++ b/rbx-dom @@ -1 +1 @@ -Subproject commit 188dc9da72de70452909b0c5f67d9a42c9dbad05 +Subproject commit bd865f3b54d7d46bd049501552c8b775d716ade9 diff --git a/src/cli/sourcemap.rs b/src/cli/sourcemap.rs index 1e4acee4..cfb61377 100644 --- a/src/cli/sourcemap.rs +++ b/src/cli/sourcemap.rs @@ -214,16 +214,15 @@ fn recurse_create_node<'a>( Vec::with_capacity(instance.metadata().relevant_paths.len()); // Canonicalize project_dir once to normalize Windows \\?\ prefixes - let canonical_project_dir = std::fs::canonicalize(project_dir) - .unwrap_or_else(|_| project_dir.to_path_buf()); + let canonical_project_dir = + std::fs::canonicalize(project_dir).unwrap_or_else(|_| project_dir.to_path_buf()); for val in file_paths { if use_absolute_paths { let abs_path = path::absolute(val).expect(ABSOLUTE_PATH_FAILED_ERR); output_file_paths.push(Cow::Owned(abs_path)); } else { - let canonical_val = std::fs::canonicalize(val) - .unwrap_or_else(|_| val.to_path_buf()); + let canonical_val = std::fs::canonicalize(val).unwrap_or_else(|_| val.to_path_buf()); output_file_paths.push(Cow::Owned( pathdiff::diff_paths(&canonical_val, &canonical_project_dir) .expect("Failed to compute relative path from project dir"), diff --git a/src/resolution.rs b/src/resolution.rs index fe657934..d1a92e26 100644 --- a/src/resolution.rs +++ b/src/resolution.rs @@ -203,7 +203,7 @@ impl AmbiguousValue { (VariantType::String, AmbiguousValue::String(value)) => Ok(value.into()), (VariantType::Tags, AmbiguousValue::StringArray(value)) => { - Ok(Tags::from(value).into()) + Ok(value.iter().map(String::as_str).collect::().into()) } (VariantType::Content, AmbiguousValue::String(value)) => { Ok(Content::from(value).into()) @@ -304,7 +304,7 @@ fn find_descriptor( return Some(descriptor); } - current_class_name = class.superclass.as_deref()?; + current_class_name = class.superclass?; } } diff --git a/src/snapshot_middleware/project.rs b/src/snapshot_middleware/project.rs index f96f88cd..bccce551 100644 --- a/src/snapshot_middleware/project.rs +++ b/src/snapshot_middleware/project.rs @@ -81,7 +81,7 @@ fn middleware_for_script(inst: &Instance) -> Middleware { if let (Some(enums), Some(value)) = (run_context_enums, run_context_value) { for (name, &enum_value) in enums { if enum_value == value { - return match name.as_ref() { + return match *name { "Server" => Middleware::ServerScriptDir, "Client" => Middleware::ClientScriptDir, "Plugin" => Middleware::PluginScriptDir, diff --git a/src/web/api.rs b/src/web/api.rs index dcaf1282..b0d772f8 100644 --- a/src/web/api.rs +++ b/src/web/api.rs @@ -2108,7 +2108,7 @@ impl ApiService { // Find which RunContext this value corresponds to for (name, &enum_value) in enums { if enum_value == value { - return match name.as_ref() { + return match *name { "Client" => "client", "Server" => "server", "Legacy" => "legacy", @@ -3711,7 +3711,7 @@ mod tests { if let (Some(enums), Some(value)) = (run_context_enums, run_context_value) { for (name, &enum_value) in enums { if enum_value == value { - return match name.as_ref() { + return match *name { "Client" => "client", "Server" => "server", "Legacy" => "legacy",