Skip to content

Commit

Permalink
update doc comments to satisfy clippy (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Aug 30, 2024
1 parent 38d394c commit 00d177e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/object_identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ use alloc::fmt;

const MAX_OID_LENGTH: usize = 63;

/// Represents an ASN.1 `OBJECT IDENTIFIER`. `ObjectIdentifier`s are opaque,
/// the only thing may be done with them is test if they are equal to another
/// `ObjectIdentifier`. The generally recommended practice for handling them
/// is to create some `ObjectIdentifier` constants with `asn1::oid!()` and
/// then compare them with `ObjectIdentifier`s you get from parsing.
/// Represents an ASN.1 `OBJECT IDENTIFIER`.
///
/// `ObjectIdentifier`s are opaque, the only thing may be done with them is
/// test if they are equal to another `ObjectIdentifier`. The generally
/// recommended practice for handling them is to create some
/// `ObjectIdentifier` constants with `asn1::oid!()` and then compare them
/// with `ObjectIdentifier`s you get from parsing.
///
/// `asn1::oid!()` takes a series of arcs, for example: `asn1::oid!(1, 2, 3)`.
///
Expand Down
9 changes: 6 additions & 3 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,9 +1202,12 @@ declare_choice!(Choice1 => (T1 ChoiceA));
declare_choice!(Choice2 => (T1 ChoiceA), (T2 ChoiceB));
declare_choice!(Choice3 => (T1 ChoiceA), (T2 ChoiceB), (T3 ChoiceC));

/// Represents an ASN.1 `SEQUENCE`. By itself, this merely indicates a sequence of bytes that are
/// claimed to form an ASN1 sequence. In almost any circumstance, you'll want to immediately call
/// `Sequence.parse` on this value to decode the actual contents therein.
/// Represents an ASN.1 `SEQUENCE`.
///
/// By itself, this merely indicates a sequence of bytes that are claimed to
// form an ASN1 sequence. In almost any circumstance, you'll want to
/// immediately call `Sequence.parse` on this value to decode the actual
/// contents therein.
#[derive(Debug, PartialEq, Hash, Clone, Eq)]
pub struct Sequence<'a> {
data: &'a [u8],
Expand Down

0 comments on commit 00d177e

Please sign in to comment.