We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0037af7 commit 82d38a8Copy full SHA for 82d38a8
src/error/completion.rs
@@ -65,22 +65,10 @@ impl<T> Completion<T> {
65
/// be stored, one of them will be spilled into the logs.
66
///
67
pub fn with_status(self, extra_status: Status) -> Self {
68
- match self {
69
- Completion::Success(res) => {
70
- if extra_status.is_success() {
71
- Completion::Success(res)
72
- } else {
73
- Completion::Warning(res, extra_status)
74
- }
75
76
- Completion::Warning(res, stat) => {
77
78
- Completion::Warning(res, stat)
79
80
- log_warning(stat);
81
82
83
+ if extra_status.is_success() {
+ self
+ } else {
+ Completion::Warning(self.log(), extra_status)
84
}
85
86
0 commit comments