Skip to content

Commit 431d829

Browse files
rename to from_str
1 parent cd9ef08 commit 431d829

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl Error {
174174
}
175175

176176
/// Create a new error object from static string.
177-
pub fn new_from_str<M>(kind: ErrorKind, msg: M, status: StatusCode) -> Self
177+
pub fn from_str<M>(kind: ErrorKind, msg: M, status: StatusCode) -> Self
178178
where
179179
M: Display + Debug + Send + Sync + 'static,
180180
{
@@ -190,7 +190,7 @@ impl Error {
190190
where
191191
M: Display + Debug + Send + Sync + 'static,
192192
{
193-
Self::new_from_str(ErrorKind::Other, message, StatusCode::InternalServerError)
193+
Self::from_str(ErrorKind::Other, message, StatusCode::InternalServerError)
194194
}
195195

196196
/// Create a new error object from an I/O error.

0 commit comments

Comments
 (0)