Skip to content

general improvements#2

Open
g1-1-1 wants to merge 3 commits into
flazepe:masterfrom
g1-1-1:master
Open

general improvements#2
g1-1-1 wants to merge 3 commits into
flazepe:masterfrom
g1-1-1:master

Conversation

@g1-1-1

@g1-1-1 g1-1-1 commented Jun 27, 2023

Copy link
Copy Markdown

this is untested, please test this and make sure it works properly.

g1-1-1 added 3 commits June 27, 2023 17:34
- refactor error handling to use `result` types
- use proper string concatenation methods for efficiency
- make API base URL configurable
- update struct names to follow snake_case convention
- add inline comments and documentation for clarity
- separate token validation and object initialization logic into distinct functions
- replace unwrap and panic with proper error handling using `result` and the `?` operator
- remove unnecessary string formatting in API requests for better performance
- provide more informative error messages for token validation and network errors
- extracts common functionality into helper methods
- uses `result` for error handling
- more constants
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.

1 participant