Skip to content

Conversation

@Earlopain
Copy link
Contributor

The only usage in library code was to hold the config and that is never exposed to users. Just use a normal struct for that.

The only usage in library code was to hold the config and that is
never exposed to users.
@michaelklishin michaelklishin added this to the 1.4.0 milestone May 20, 2025
@michaelklishin
Copy link
Member

@Earlopain I'm not against using a regular struct but just out of curiosity: what motivates you to spend time removing ostruct from Hutch?

@michaelklishin michaelklishin merged commit a05fc29 into ruby-amqp:main May 20, 2025
6 checks passed
@Earlopain
Copy link
Contributor Author

Nobody should be using openstruct if they can help themselves. It emits a performance warning (disabled by default, you need to explicitly opt in) when used:

$ ruby -W:performance -rostruct -e "OpenStruct.new"
-e:1: warning: OpenStruct use is discouraged for performance reasons

Of course this is not at all a problem here. But the replacement is trivial and one less dependency is nice to me as well.

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