Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1a6e8f7

Browse files
committedMar 24, 2025
fix: return a slice instead of a vec
1 parent 39d418c commit 1a6e8f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/async_impl/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Response {
121121

122122
/// Get all the intermediate `Url`s traversed by redirects.
123123
#[inline]
124-
pub fn history(&self) -> &Vec<Url> {
124+
pub fn history(&self) -> &[Url] {
125125
&self.history
126126
}
127127

‎src/blocking/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl Response {
165165

166166
/// Get all the intermediate `Url`s traversed by redirects.
167167
#[inline]
168-
pub fn history(&self) -> &Vec<Url> {
168+
pub fn history(&self) -> &[Url] {
169169
self.inner.history()
170170
}
171171

0 commit comments

Comments
 (0)
Please sign in to comment.