refactor: rearrange state methods (#1252)

This commit is contained in:
Myriad-Dreamin 2025-02-02 16:24:12 +08:00 committed by GitHub
parent 4ce405a89b
commit 5069a89d5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 445 additions and 453 deletions

View file

@ -330,7 +330,7 @@ pub mod prelude {
use crate::Error;
pub use super::{IgnoreLogging, WithContext, WithContextUntyped};
pub use crate::Result;
pub use crate::{bail, Result};
pub fn map_string_err<T: ToString>(loc: &'static str) -> impl Fn(T) -> Error {
move |e| Error::new(loc, e.to_string().to_error_kind(), None)