Skip to content

Commit

Permalink
fix: refine codes
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn committed Nov 7, 2024
1 parent 90febe3 commit 008f94d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion core/src/ten_runtime/app/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ bool ten_app_check_start_graph_cmd_json(ten_app_t *self,
TEN_ASSERT(start_graph_cmd_json, "Invalid argument.");

#if defined(TEN_ENABLE_TEN_RUST_APIS)

const char *base_dir = ten_app_get_base_dir(self);

// The pkg_info of extensions in the graph is read from the ten_packages
Expand Down
8 changes: 0 additions & 8 deletions core/src/ten_runtime/metadata/metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ bool ten_manifest_json_string_is_valid(const char *json_string,
TEN_ASSERT(err && ten_error_check_integrity(err), "Invalid argument.");

#if defined(TEN_ENABLE_TEN_RUST_APIS)

const char *err_msg = NULL;
bool rc = ten_validate_manifest_json_string(json_string, &err_msg);

Expand All @@ -163,7 +162,6 @@ bool ten_manifest_json_string_is_valid(const char *json_string,
ten_rust_free_cstring(err_msg);
return false;
}

#endif

return true;
Expand All @@ -174,7 +172,6 @@ bool ten_manifest_json_file_is_valid(const char *json_file, ten_error_t *err) {
TEN_ASSERT(err && ten_error_check_integrity(err), "Invalid argument.");

#if defined(TEN_ENABLE_TEN_RUST_APIS)

const char *err_msg = NULL;
bool rc = ten_validate_manifest_json_file(json_file, &err_msg);

Expand All @@ -183,7 +180,6 @@ bool ten_manifest_json_file_is_valid(const char *json_file, ten_error_t *err) {
ten_rust_free_cstring(err_msg);
return false;
}

#endif

return true;
Expand All @@ -195,7 +191,6 @@ bool ten_property_json_string_is_valid(const char *json_string,
TEN_ASSERT(err && ten_error_check_integrity(err), "Invalid argument.");

#if defined(TEN_ENABLE_TEN_RUST_APIS)

const char *err_msg = NULL;
bool rc = ten_validate_property_json_string(json_string, &err_msg);

Expand All @@ -204,7 +199,6 @@ bool ten_property_json_string_is_valid(const char *json_string,
ten_rust_free_cstring(err_msg);
return false;
}

#endif

return true;
Expand All @@ -215,7 +209,6 @@ bool ten_property_json_file_is_valid(const char *json_file, ten_error_t *err) {
TEN_ASSERT(err && ten_error_check_integrity(err), "Invalid argument.");

#if defined(TEN_ENABLE_TEN_RUST_APIS)

const char *err_msg = NULL;
bool rc = ten_validate_property_json_file(json_file, &err_msg);

Expand All @@ -224,7 +217,6 @@ bool ten_property_json_file_is_valid(const char *json_file, ten_error_t *err) {
ten_rust_free_cstring(err_msg);
return false;
}

#endif

return true;
Expand Down
2 changes: 0 additions & 2 deletions core/src/ten_runtime/schema_store/interface_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ten_value_t *ten_interface_schema_info_resolve(
}

#if defined(TEN_ENABLE_TEN_RUST_APIS)

ten_json_t *unresolved_interface_schema_json =
ten_value_to_json(unresolved_interface_schema_def);

Expand Down Expand Up @@ -82,7 +81,6 @@ ten_value_t *ten_interface_schema_info_resolve(
}

return resolved_interface_schema_def;

#else
return NULL;
#endif
Expand Down

0 comments on commit 008f94d

Please sign in to comment.