Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ pub type ObjectFields = Vec<(String, PrismaValue)>;
/// Creates a PrismaValue::Object from a list of key-value pairs.
/// If a key has multiple values that are PrismaValue::Objects, they will be merged.
pub fn merge_fields(fields: Vec<(String, PrismaValue)>) -> Vec<(String, PrismaValue)> {
todo!();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 Bug: todo!() macro will panic at runtime, breaking the function

Suggested fix

The todo!() macro inserted at line 120 will cause a panic when merge_fields is called, preventing the function from executing its intended logic. This appears to be leftover debugging code or was added accidentally.

The todo!() macro in Rust is meant for marking incomplete code during development - it will always panic with "not yet implemented" when reached.

Impact: Any code path that calls merge_fields() will crash at runtime.

Suggested fix: Remove the todo!(); line entirely to allow the function to execute its actual merging logic.


Was this helpful? React with 👍 / 👎

  • Apply suggested fix

let mut merged = HashMap::new();

for el in fields {
Expand Down
Loading