1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

consistent naming

This commit is contained in:
Nikolay Kim
2017-11-26 22:31:29 -08:00
parent 45433f71e5
commit 0519056199
10 changed files with 25 additions and 24 deletions

View File

@@ -52,8 +52,8 @@ pub const HTTPInternalServerError: StaticResponse =
pub struct StaticResponse(StatusCode);
impl StaticResponse {
pub fn builder(&self) -> HttpResponseBuilder {
HttpResponse::builder(self.0)
pub fn build(&self) -> HttpResponseBuilder {
HttpResponse::build(self.0)
}
pub fn response(&self) -> HttpResponse {
HttpResponse::new(self.0, Body::Empty)
@@ -87,8 +87,8 @@ mod tests {
use super::{HTTPOk, HTTPBadRequest, Body, HttpResponse};
#[test]
fn test_builder() {
let resp = HTTPOk.builder().body(Body::Empty).unwrap();
fn test_build() {
let resp = HTTPOk.build().body(Body::Empty).unwrap();
assert_eq!(resp.status(), StatusCode::OK);
}