* [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink
@ 2024-12-03 13:41 Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 2/4] pxar: extract: docs: remove redundant explicit link Maximiliano Sandoval
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-12-03 13:41 UTC (permalink / raw)
To: pbs-devel
Fixes the cargo doc lint:
```
warning: this URL is not a hyperlink
--> pbs-datastore/src/data_blob.rs:555:5
|
555 | /// https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: bare URLs are not automatically turned into clickable links
= note: `#[warn(rustdoc::bare_urls)]` on by default
help: use an automatic link instead
|
555 | /// <https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h>
| + +
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
Found more warnings when running
cargo doc --workspace --all
pbs-datastore/src/data_blob.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pbs-datastore/src/data_blob.rs b/pbs-datastore/src/data_blob.rs
index 0fb4d44c..0c05c5a4 100644
--- a/pbs-datastore/src/data_blob.rs
+++ b/pbs-datastore/src/data_blob.rs
@@ -552,7 +552,7 @@ impl<'a, 'b> DataChunkBuilder<'a, 'b> {
/// Check if the error code returned by `zstd_safe::compress`, or anything else that does FFI calls
/// into zstd code, was `70` 'Destination buffer is too small' by subtracting the error code from
/// `0` (with underflow), see `ERR_getErrorCode` in
-/// https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h
+/// <https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h>
///
/// There is a test below to ensure we catch any change in the interface or internal value.
fn zstd_error_is_target_too_small(err: usize) -> bool {
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH backup 2/4] pxar: extract: docs: remove redundant explicit link
2024-12-03 13:41 [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Maximiliano Sandoval
@ 2024-12-03 13:41 ` Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 3/4] datastore: docs: escape <uuid> Maximiliano Sandoval
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-12-03 13:41 UTC (permalink / raw)
To: pbs-devel
Also fix `Entries` link.
Fixes the cargo doc lint:
```
warning: redundant explicit link target
--> pbs-client/src/pxar/extract.rs:212:27
|
212 | /// * The [`Entry`][E]'s filename is invalid (contains nul bytes or a slash)
| ------- ^ explicit target is redundant
| |
| because label contains path that resolves to same destination
|
note: referenced explicit link target defined here
--> pbs-client/src/pxar/extract.rs:221:14
|
221 | /// [E]: pxar::Entry
| ^^^^^^^^^^^
= note: when a link's destination is not specified,
the label is used to resolve intra-doc links
= note: `#[warn(rustdoc::redundant_explicit_links)]` on by default
help: remove explicit link target
|
212 | /// * The [`Entry`]'s filename is invalid (contains nul bytes or a slash)
| ~~~~~~~~~
warning: redundant explicit link target
--> pbs-client/src/pxar/extract.rs:215:37
|
215 | /// fetching the next [`Entry`][E]), the error may be handled by the
| ------- ^ explicit target is redundant
| |
| because label contains path that resolves to same destination
|
note: referenced explicit link target defined here
--> pbs-client/src/pxar/extract.rs:221:14
|
221 | /// [E]: pxar::Entry
| ^^^^^^^^^^^
= note: when a link's destination is not specified,
the label is used to resolve intra-doc links
help: remove explicit link target
|
215 | /// fetching the next [`Entry`]), the error may be handled by the
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
pbs-client/src/pxar/extract.rs | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pbs-client/src/pxar/extract.rs b/pbs-client/src/pxar/extract.rs
index cfbd8d51..48e3aef4 100644
--- a/pbs-client/src/pxar/extract.rs
+++ b/pbs-client/src/pxar/extract.rs
@@ -202,23 +202,22 @@ where
{
type Item = Result<(), Error>;
- /// Performs the extraction of [`Entries`][E] yielded by the [`Decoder`][D].
+ /// Performs the extraction of [`Entries`][Entry] yielded by the [`Decoder`][D].
///
/// In detail, the [`ExtractorIter`] will stop if and only if one of the
/// following conditions is true:
/// * The [`Decoder`][D] is exhausted
/// * The [`Decoder`][D] failed to read from the archive and consequently
/// yielded an [`io::Error`]
- /// * The [`Entry`][E]'s filename is invalid (contains nul bytes or a slash)
+ /// * The [`Entry`]'s filename is invalid (contains nul bytes or a slash)
///
/// Should an error occur during any point of extraction (**not** while
- /// fetching the next [`Entry`][E]), the error may be handled by the
+ /// fetching the next [`Entry`]), the error may be handled by the
/// [`ErrorHandler`] provided by the [`PxarExtractOptions`] used to
/// initialize the iterator.
///
/// Extraction errors will have a corresponding [`PxarExtractContext`] attached.
///
- /// [E]: pxar::Entry
/// [D]: pxar::decoder::Decoder
fn next(&mut self) -> Option<Self::Item> {
if self.state.end_reached {
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH backup 3/4] datastore: docs: escape <uuid>
2024-12-03 13:41 [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 2/4] pxar: extract: docs: remove redundant explicit link Maximiliano Sandoval
@ 2024-12-03 13:41 ` Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 4/4] auth: doc: Explicitly set namespace for UserInfomation Maximiliano Sandoval
2024-12-04 13:42 ` [pbs-devel] applied-series: [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Fabian Grünbichler
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-12-03 13:41 UTC (permalink / raw)
To: pbs-devel
Fixes the cargo doc lint:
```
warning: unclosed HTML tag `uuid`
--> pbs-datastore/src/datastore.rs:60:41
|
60 | /// - could not stat /dev/disk/by-uuid/<uuid>
| ^^^^^^
|
= note: `#[warn(rustdoc::invalid_html_tags)]` on by default
warning: unclosed HTML tag `uuid`
--> pbs-datastore/src/datastore.rs:61:26
|
61 | /// - /dev/disk/by-uuid/<uuid> is not a block device
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
pbs-datastore/src/datastore.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index cf55befa..0801b4bf 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -56,9 +56,9 @@ pub fn check_backup_owner(owner: &Authid, auth_id: &Authid) -> Result<(), Error>
/// returning false.
///
/// Reasons it could fail other than not being mounted where expected:
-/// - could not read /proc/self/mountinfo
-/// - could not stat /dev/disk/by-uuid/<uuid>
-/// - /dev/disk/by-uuid/<uuid> is not a block device
+/// - could not read `/proc/self/mountinfo`
+/// - could not stat `/dev/disk/by-uuid/<uuid>`
+/// - `/dev/disk/by-uuid/<uuid>` is not a block device
///
/// Since these are very much out of our control, there is no real value in distinguishing
/// between them, so for this function they all are treated as 'device not mounted'
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] [PATCH backup 4/4] auth: doc: Explicitly set namespace for UserInfomation
2024-12-03 13:41 [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 2/4] pxar: extract: docs: remove redundant explicit link Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 3/4] datastore: docs: escape <uuid> Maximiliano Sandoval
@ 2024-12-03 13:41 ` Maximiliano Sandoval
2024-12-04 13:42 ` [pbs-devel] applied-series: [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Fabian Grünbichler
3 siblings, 0 replies; 5+ messages in thread
From: Maximiliano Sandoval @ 2024-12-03 13:41 UTC (permalink / raw)
To: pbs-devel
Fixes the cargo doc warning:
```
warning: unresolved link to `UserInformation`
--> src/auth.rs:418:53
|
418 | /// Check if a userid is enabled and return a [`UserInformation`] handle.
| ^^^^^^^^^^^^^^^ no item named `UserInformation` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/auth.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/auth.rs b/src/auth.rs
index d0fb0a9f..86b12a76 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -415,7 +415,7 @@ impl proxmox_auth_api::api::AuthContext for PbsAuthContext {
"PBSAuthCookie"
}
- /// Check if a userid is enabled and return a [`UserInformation`] handle.
+ /// Check if a userid is enabled and return a [`proxmox_router::UserInformation`] handle.
fn auth_id_is_active(&self, auth_id: &Authid) -> Result<bool, Error> {
Ok(pbs_config::CachedUserInfo::new()?.is_active_auth_id(auth_id))
}
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] applied-series: [PATCH backup 1/4] datastore: docs: turn uri into hyperlink
2024-12-03 13:41 [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Maximiliano Sandoval
` (2 preceding siblings ...)
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 4/4] auth: doc: Explicitly set namespace for UserInfomation Maximiliano Sandoval
@ 2024-12-04 13:42 ` Fabian Grünbichler
3 siblings, 0 replies; 5+ messages in thread
From: Fabian Grünbichler @ 2024-12-04 13:42 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
thanks!
On December 3, 2024 2:41 pm, Maximiliano Sandoval wrote:
> Fixes the cargo doc lint:
>
> ```
> warning: this URL is not a hyperlink
> --> pbs-datastore/src/data_blob.rs:555:5
> |
> 555 | /// https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> |
> = note: bare URLs are not automatically turned into clickable links
> = note: `#[warn(rustdoc::bare_urls)]` on by default
> help: use an automatic link instead
> |
> 555 | /// <https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h>
> | + +
> ```
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> Found more warnings when running
>
> cargo doc --workspace --all
>
>
> pbs-datastore/src/data_blob.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/pbs-datastore/src/data_blob.rs b/pbs-datastore/src/data_blob.rs
> index 0fb4d44c..0c05c5a4 100644
> --- a/pbs-datastore/src/data_blob.rs
> +++ b/pbs-datastore/src/data_blob.rs
> @@ -552,7 +552,7 @@ impl<'a, 'b> DataChunkBuilder<'a, 'b> {
> /// Check if the error code returned by `zstd_safe::compress`, or anything else that does FFI calls
> /// into zstd code, was `70` 'Destination buffer is too small' by subtracting the error code from
> /// `0` (with underflow), see `ERR_getErrorCode` in
> -/// https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h
> +/// <https://github.com/facebook/zstd/blob/dev/lib/common/error_private.h>
> ///
> /// There is a test below to ensure we catch any change in the interface or internal value.
> fn zstd_error_is_target_too_small(err: usize) -> bool {
> --
> 2.39.5
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
>
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-04 13:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 13:41 [pbs-devel] [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 2/4] pxar: extract: docs: remove redundant explicit link Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 3/4] datastore: docs: escape <uuid> Maximiliano Sandoval
2024-12-03 13:41 ` [pbs-devel] [PATCH backup 4/4] auth: doc: Explicitly set namespace for UserInfomation Maximiliano Sandoval
2024-12-04 13:42 ` [pbs-devel] applied-series: [PATCH backup 1/4] datastore: docs: turn uri into hyperlink Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox