Skip to content

Commit 2149cf4

Browse files
committed
Improvements
1 parent f3dba92 commit 2149cf4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

my-http-server-core/src/http_output.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,16 @@ impl HttpOutput {
107107
}
108108
}
109109

110-
pub fn into_fail_result(
110+
pub fn into_err(
111111
self,
112+
write_log: bool,
112113
write_telemetry: bool,
113-
write_logs: bool,
114114
) -> Result<HttpOkResult, HttpFailResult> {
115-
Err(HttpFailResult {
116-
write_telemetry,
117-
write_to_log: write_logs,
118-
#[cfg(feature = "with-telemetry")]
119-
add_telemetry_tags: my_telemetry::TelemetryEventTagsBuilder::new(),
120-
output: self,
121-
})
115+
Err(self.into_http_fail_result(write_log, write_telemetry))
116+
}
117+
118+
pub fn into_http_fail_result(self, write_log: bool, write_telemetry: bool) -> HttpFailResult {
119+
HttpFailResult::new(self, write_log, write_telemetry)
122120
}
123121

124122
pub fn as_text<'s>(text: impl Into<StrOrString<'s>>) -> HttpResultBuilder {

0 commit comments

Comments
 (0)