Skip to content

Commit

Permalink
Update src/pointer.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Chance <chanceusc@gmail.com>
  • Loading branch information
asmello and chanced authored Oct 16, 2024
1 parent 1722895 commit d203fa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ impl Pointer {
/// This is a cost-free conversion.
///
/// ## Safety
/// The provided string must adhere to RFC 6901.
/// The provided string must adhere to [RFC 6901](https://datatracker.ietf.org/doc/html/rfc6901):
/// - The pointer must start with `'/'` (%x2F) unless empty
/// - Tokens must be properly encoded:
/// - `'~'` (%x7E) must be escaped as `"~0"`
/// - `'/'` (%x2F) must be escaped as `"~1"`
/// For potentially fallible parsing, see [`Pointer::parse`].

Check failure on line 62 in src/pointer.rs

View workflow job for this annotation

GitHub Actions / stable / clippy

[clippy] reported by reviewdog 🐶 error: doc list item without indentation --> src/pointer.rs:62:9 | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation note: the lint level is defined here --> src/lib.rs:38:9 | 38 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::doc_lazy_continuation)]` implied by `#[deny(clippy::all)]` help: indent this line | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ++++++ Raw Output: src/pointer.rs:62:9:e:error: doc list item without indentation --> src/pointer.rs:62:9 | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation note: the lint level is defined here --> src/lib.rs:38:9 | 38 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::doc_lazy_continuation)]` implied by `#[deny(clippy::all)]` help: indent this line | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ++++++ __END__

Check failure on line 62 in src/pointer.rs

View workflow job for this annotation

GitHub Actions / beta / clippy

[clippy] reported by reviewdog 🐶 error: doc list item without indentation --> src/pointer.rs:62:9 | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation note: the lint level is defined here --> src/lib.rs:38:9 | 38 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::doc_lazy_continuation)]` implied by `#[deny(clippy::all)]` help: indent this line | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ++++++ Raw Output: src/pointer.rs:62:9:e:error: doc list item without indentation --> src/pointer.rs:62:9 | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation note: the lint level is defined here --> src/lib.rs:38:9 | 38 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::doc_lazy_continuation)]` implied by `#[deny(clippy::all)]` help: indent this line | 62 | /// For potentially fallible parsing, see [`Pointer::parse`]. | ++++++ __END__
pub unsafe fn new_unchecked<S: AsRef<str> + ?Sized>(s: &S) -> &Self {
&*(core::ptr::from_ref::<str>(s.as_ref()) as *const Self)
}
Expand Down

0 comments on commit d203fa1

Please sign in to comment.