From 049b49290d87859f1e6ac57374aa69387589ab90 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 7 Oct 2024 21:23:17 +0100 Subject: [PATCH] docs: fix long paragraph warning --- actix-web/src/http/header/content_disposition.rs | 15 ++++++++++----- justfile | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/actix-web/src/http/header/content_disposition.rs b/actix-web/src/http/header/content_disposition.rs index 592fc9f6a..ff3bb6761 100644 --- a/actix-web/src/http/header/content_disposition.rs +++ b/actix-web/src/http/header/content_disposition.rs @@ -206,11 +206,11 @@ impl DispositionParam { } } -/// A *Content-Disposition* header. It is compatible to be used either as -/// [a response header for the main body](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#as_a_response_header_for_the_main_body) -/// as (re)defined in [RFC 6266](https://datatracker.ietf.org/doc/html/rfc6266), or as -/// [a header for a multipart body](https://mdn.io/Content-Disposition#As_a_header_for_a_multipart_body) -/// as (re)defined in [RFC 7587](https://datatracker.ietf.org/doc/html/rfc7578). +/// `Content-Disposition` header. +/// +/// It is compatible to be used either as [a response header for the main body][use_main_body] +/// as (re)defined in [RFC 6266], or as [a header for a multipart body][use_multipart] as +/// (re)defined in [RFC 7587]. /// /// In a regular HTTP response, the *Content-Disposition* response header is a header indicating if /// the content is expected to be displayed *inline* in the browser, that is, as a Web page or as @@ -305,6 +305,11 @@ impl DispositionParam { /// change to match local file system conventions if applicable, and do not use directory path /// information that may be present. /// See [RFC 2183 ยง2.3](https://datatracker.ietf.org/doc/html/rfc2183#section-2.3). +/// +/// [use_main_body]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#as_a_response_header_for_the_main_body +/// [RFC 6266]: https://datatracker.ietf.org/doc/html/rfc6266 +/// [use_multipart]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#as_a_header_for_a_multipart_body +/// [RFC 7587]: https://datatracker.ietf.org/doc/html/rfc7578 #[derive(Debug, Clone, PartialEq, Eq)] pub struct ContentDisposition { /// The disposition type diff --git a/justfile b/justfile index 2de247a6a..4ab2796c0 100644 --- a/justfile +++ b/justfile @@ -73,6 +73,7 @@ test-coverage-lcov toolchain="": (test-coverage toolchain) # Document crates in workspace. doc *args: && doc-set-workspace-crates + rm -f "$(cargo metadata --format-version=1 | jq -r '.target_directory')/doc/crates.js" RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --workspace {{ all_crate_features }} {{ args }} [private]