-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: final tweaks to messenger #86
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #86 +/- ##
==========================================
+ Coverage 57.09% 57.10% +0.01%
==========================================
Files 114 115 +1
Lines 5589 5670 +81
==========================================
+ Hits 3191 3238 +47
- Misses 2398 2432 +34
☔ View full report in Codecov by Sentry. |
@@ -2,12 +2,41 @@ use ahash::HashMap; | |||
use serde::{Deserialize, Serialize}; // 1.0.130 | |||
use serde_json::{self}; | |||
|
|||
fn default_text_plain_encoding() -> String { | |||
"text/plain".to_string() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any reasons why did you methods instead of constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually didn't like this approach as well, but serde supports assigning custom default values only via functions
or methods
.
You can refer to this long running issue which was opened in 2016, and still active discussions on it.
I looked at some suggestions, and thought maybe it's an overkill for now, and just kept it simple with the function
get_mut
andget_meta
to the core suffix.