Skip to content

fix: Replace unwrap with ? in normalize() - #69

Merged
seanlinsley merged 1 commit into
pganalyze:mainfrom
AndreaBozzo:replace-unwrap
Dec 7, 2025
Merged

fix: Replace unwrap with ? in normalize()#69
seanlinsley merged 1 commit into
pganalyze:mainfrom
AndreaBozzo:replace-unwrap

Conversation

@AndreaBozzo

Copy link
Copy Markdown
Contributor

Replace .unwrap() with ? in normalize() for consistent error handling.

The normalize() function was the only public API function using .unwrap() on CString::new(), while all other functions (parse(), fingerprint(), scan(), etc.) use ? for proper error propagation.

Changes

  • src/query.rs: Line 98 - CString::new(statement).unwrap()CString::new(statement)?

@seanlinsley seanlinsley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch, thanks for fixing this

@seanlinsley
seanlinsley merged commit 6e8e92f into pganalyze:main Dec 7, 2025
7 checks passed
@AndreaBozzo

Copy link
Copy Markdown
Contributor Author

@seanlinsley thanks to you for the very quick review/merge, have a nice week end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants