refactor(errors): error enums to use 'static str (#472)

This commit is contained in:
Narayan Bhat
2023-01-30 18:57:05 +05:30
committed by GitHub
parent fa7d087c0d
commit 24351a6c85
25 changed files with 84 additions and 79 deletions

View File

@ -7,11 +7,11 @@ use crate::{
};
pub fn missing_field_err(
message: &str,
message: &'static str,
) -> Box<dyn Fn() -> error_stack::Report<errors::ConnectorError> + '_> {
Box::new(|| {
Box::new(move || {
errors::ConnectorError::MissingRequiredField {
field_name: message.to_string(),
field_name: message,
}
.into()
})