fix(es): Make ErrorConfig.filename default to true (#4150)

This commit is contained in:
RiESAEX 2022-03-25 13:06:15 +08:00 committed by GitHub
parent d8abd9d2aa
commit 7a1dcb1b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -1291,12 +1291,16 @@ fn default_jsonify_min_cost() -> usize {
1024
}
#[derive(Debug, Default, Clone, Copy, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "camelCase")]
pub struct ErrorConfig {
#[serde(default = "true_by_default")]
pub filename: bool,
}
impl Default for ErrorConfig {
fn default() -> Self {
ErrorConfig { filename: true }
}
}
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields, rename_all = "camelCase")]

View File

@ -100,6 +100,7 @@ macro_rules! semi {
};
}
///
/// - `srcmap!(true)` for start (span.lo)
/// - `srcmap!(false)` for end (span.hi)
macro_rules! srcmap {