Skip to content

Commit

Permalink
Rename as_header_map to to_header_map (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazytonyli authored Jan 21, 2025
1 parent c31d0cd commit 6f2b564
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wp_api/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl WpNetworkHeaderMap {
.collect()
}

pub fn as_header_map(&self) -> HeaderMap {
pub fn to_header_map(&self) -> HeaderMap {
self.inner.clone()
}
}
Expand Down
4 changes: 2 additions & 2 deletions wp_api_integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl AsyncWpNetworking {
Self::request_method(wp_request.method()),
wp_request.url().0.as_str(),
)
.headers(wp_request.header_map().as_header_map());
.headers(wp_request.header_map().to_header_map());
if let Some(body) = wp_request.body() {
request = request.body(body.contents());
}
Expand All @@ -193,7 +193,7 @@ impl AsyncWpNetworking {
Self::request_method(media_upload_request.method()),
media_upload_request.url().0.as_str(),
)
.headers(media_upload_request.header_map().as_header_map());
.headers(media_upload_request.header_map().to_header_map());
let file_path = media_upload_request.file_path();
let mut file_header_map = HeaderMap::new();
file_header_map.insert(
Expand Down
2 changes: 1 addition & 1 deletion wp_api_integration_tests/tests/test_media_err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl RequestExecutor for MediaErrNetworking {
AsyncWpNetworking::request_method(media_upload_request.method()),
media_upload_request.url().0.as_str(),
)
.headers(media_upload_request.header_map().as_header_map());
.headers(media_upload_request.header_map().to_header_map());
let mut file_header_map = HeaderMap::new();
file_header_map.insert(
http::header::CONTENT_TYPE,
Expand Down

0 comments on commit 6f2b564

Please sign in to comment.