File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed
Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ match_wild_err_arm = "warn"
105105match_wildcard_for_single_variants = " warn"
106106maybe_infinite_iter = " warn"
107107mismatching_type_param_order = " warn"
108- missing_errors_doc = " allow " # TODO: Still needs considering.
108+ missing_errors_doc = " warn "
109109missing_fields_in_debug = " warn"
110110missing_panics_doc = " allow" # TODO: Still needs considering.
111111must_use_candidate = " allow" # Useful for audit but many false positives.
Original file line number Diff line number Diff line change 22
33// methods are implementation of a standardized serde-specific signature
44#![ allow( missing_docs) ]
5+ #![ allow( clippy:: missing_errors_doc) ]
56
67//! This module adds serde serialization and deserialization support for amounts.
78//!
Original file line number Diff line number Diff line change 33// Module implements standardized serde-specific trait methods.
44#![ allow( missing_docs) ]
55#![ allow( clippy:: trivially_copy_pass_by_ref) ]
6+ #![ allow( clippy:: missing_errors_doc) ]
67
78//! This module adds serde serialization and deserialization support for amounts.
89//!
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ impl Height {
4141 /// Constructs a new [`Height`] from a hex string.
4242 ///
4343 /// The input string may or may not contain a typical hex prefix e.g., `0x`.
44+ ///
45+ /// # Errors
46+ ///
47+ /// If the input string is not a valid hex representation of a block height.
4448 pub fn from_hex ( s : & str ) -> Result < Self , ParseHeightError > {
4549 parse_hex ( s, Self :: from_consensus)
4650 }
@@ -139,6 +143,10 @@ impl Time {
139143 /// Constructs a new [`Time`] from a hex string.
140144 ///
141145 /// The input string may or may not contain a typical hex prefix e.g., `0x`.
146+ ///
147+ /// # Errors
148+ ///
149+ /// If the input string is not a valid hex representation of a block time.
142150 pub fn from_hex ( s : & str ) -> Result < Self , ParseTimeError > { parse_hex ( s, Self :: from_consensus) }
143151
144152 /// Constructs a new block time.
Original file line number Diff line number Diff line change @@ -76,22 +76,29 @@ mod sealed {
7676
7777/// Parses the input string as an integer returning an error carrying rich context.
7878///
79- /// On error this function allocates to copy the input string into the error return. If the caller
80- /// has a `String` or `Box<str>` which is not used later it's better to call
79+ /// If the caller has a `String` or `Box<str>` which is not used later it's better to call
8180/// [`parse::int_from_string`] or [`parse::int_from_box`] respectively.
8281///
8382/// [`parse::int_from_string`]: crate::parse::int_from_string
8483/// [`parse::int_from_box`]: crate::parse::int_from_box
84+ ///
85+ /// # Errors
86+ ///
87+ /// On error this function allocates to copy the input string into the error return.
8588pub fn int_from_str < T : Integer > ( s : & str ) -> Result < T , ParseIntError > { int ( s) }
8689
8790/// Parses the input string as an integer returning an error carrying rich context.
8891///
92+ /// # Errors
93+ ///
8994/// On error the input string is moved into the error return without allocating.
9095#[ cfg( feature = "alloc" ) ]
9196pub fn int_from_string < T : Integer > ( s : alloc:: string:: String ) -> Result < T , ParseIntError > { int ( s) }
9297
9398/// Parses the input string as an integer returning an error carrying rich context.
9499///
100+ /// # Errors
101+ ///
95102/// On error the input string is converted into the error return without allocating.
96103#[ cfg( feature = "alloc" ) ]
97104pub fn int_from_box < T : Integer > ( s : alloc:: boxed:: Box < str > ) -> Result < T , ParseIntError > { int ( s) }
You can’t perform that action at this time.
0 commit comments