File tree 5 files changed +20
-3
lines changed
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"
105
105
match_wildcard_for_single_variants = " warn"
106
106
maybe_infinite_iter = " warn"
107
107
mismatching_type_param_order = " warn"
108
- missing_errors_doc = " allow " # TODO: Still needs considering.
108
+ missing_errors_doc = " warn "
109
109
missing_fields_in_debug = " warn"
110
110
missing_panics_doc = " warn"
111
111
must_use_candidate = " allow" # Useful for audit but many false positives.
Original file line number Diff line number Diff line change 2
2
3
3
// methods are implementation of a standardized serde-specific signature
4
4
#![ allow( missing_docs) ]
5
+ #![ allow( clippy:: missing_errors_doc) ]
5
6
6
7
//! This module adds serde serialization and deserialization support for amounts.
7
8
//!
Original file line number Diff line number Diff line change 3
3
// Module implements standardized serde-specific trait methods.
4
4
#![ allow( missing_docs) ]
5
5
#![ allow( clippy:: trivially_copy_pass_by_ref) ]
6
+ #![ allow( clippy:: missing_errors_doc) ]
6
7
7
8
//! This module adds serde serialization and deserialization support for amounts.
8
9
//!
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ impl Height {
41
41
/// Constructs a new [`Height`] from a hex string.
42
42
///
43
43
/// 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.
44
48
pub fn from_hex ( s : & str ) -> Result < Self , ParseHeightError > {
45
49
parse_hex ( s, Self :: from_consensus)
46
50
}
@@ -139,6 +143,10 @@ impl Time {
139
143
/// Constructs a new [`Time`] from a hex string.
140
144
///
141
145
/// 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.
142
150
pub fn from_hex ( s : & str ) -> Result < Self , ParseTimeError > { parse_hex ( s, Self :: from_consensus) }
143
151
144
152
/// Constructs a new block time.
Original file line number Diff line number Diff line change @@ -76,22 +76,29 @@ mod sealed {
76
76
77
77
/// Parses the input string as an integer returning an error carrying rich context.
78
78
///
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
81
80
/// [`parse::int_from_string`] or [`parse::int_from_box`] respectively.
82
81
///
83
82
/// [`parse::int_from_string`]: crate::parse::int_from_string
84
83
/// [`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.
85
88
pub fn int_from_str < T : Integer > ( s : & str ) -> Result < T , ParseIntError > { int ( s) }
86
89
87
90
/// Parses the input string as an integer returning an error carrying rich context.
88
91
///
92
+ /// # Errors
93
+ ///
89
94
/// On error the input string is moved into the error return without allocating.
90
95
#[ cfg( feature = "alloc" ) ]
91
96
pub fn int_from_string < T : Integer > ( s : alloc:: string:: String ) -> Result < T , ParseIntError > { int ( s) }
92
97
93
98
/// Parses the input string as an integer returning an error carrying rich context.
94
99
///
100
+ /// # Errors
101
+ ///
95
102
/// On error the input string is converted into the error return without allocating.
96
103
#[ cfg( feature = "alloc" ) ]
97
104
pub 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