Skip to content

Commit efc8ed9

Browse files
committed
fix a few docs bugs and export HttpResponseContent
1 parent 0b5df8b commit efc8ed9

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

dropshot/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,11 @@ impl HttpError {
347347
/// If this error does not already have a header map (`self.header_map` is
348348
/// `None`), this method creates one.
349349
///
350-
/// Unlike [`HttpError::set_header`], this method takes `self` by value,
350+
/// Unlike [`HttpError::add_header`], this method takes `self` by value,
351351
/// allowing it to be chained to form an expression that returns an
352352
/// `HttpError`. However, because this takes `self` by value, returning an
353353
/// error for an invalid header name or value will discard the `HttpError`.
354-
/// To avoid this, use [`HttpError::set_header`] instead.
354+
/// To avoid this, use [`HttpError::add_header`] instead.
355355
///
356356
/// # Returns
357357
///

dropshot/src/error_status_code.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::fmt;
1616
/// Alternatively, constants are provided for known error status codes, such as
1717
/// [`ErrorStatusCode::BAD_REQUEST`], [`ErrorStatusCode::NOT_FOUND`],
1818
/// [`ErrorStatusCode::INTERNAL_SERVER_ERROR`], and so on, including those in
19-
/// the IANA HTTP Status Code Registry](
19+
/// the [IANA HTTP Status Code Registry](
2020
/// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
2121
/// Using these constants avoids the fallible conversion from an
2222
/// [`http::StatusCode`].
@@ -425,7 +425,7 @@ impl_status_code_wrapper! {
425425
///
426426
/// Alternatively, constants are provided for known error status codes, such as
427427
/// [`ClientErrorStatusCode::BAD_REQUEST`],
428-
/// [`ClientErrorStatusCode::NOT_FOUND`], including those in the IANA HTTP
428+
/// [`ClientErrorStatusCode::NOT_FOUND`], including those in the [IANA HTTP
429429
/// Status Code Registry](
430430
/// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
431431
/// Using these constants avoids the fallible conversion from an

dropshot/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ pub use handler::FreeformBody;
909909
pub use handler::HttpCodedResponse;
910910
pub use handler::HttpResponse;
911911
pub use handler::HttpResponseAccepted;
912+
pub use handler::HttpResponseContent;
912913
pub use handler::HttpResponseCreated;
913914
pub use handler::HttpResponseDeleted;
914915
pub use handler::HttpResponseError;

dropshot/src/test_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl ClientTestContext {
243243
}
244244

245245
/// Temporarily configures the client to expect `E`-typed error responses,
246-
/// rather than [`dropshot::HttpError`] error responses.
246+
/// rather than [`dropshot::HttpError`][`crate::HttpError`] error responses.
247247
///
248248
/// `ClientTestContext` expects that all error responses are
249249
/// `dropshot::HttpError`. For testing APIs that return other error types, this

0 commit comments

Comments
 (0)