File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
io/zenoh-transport/src/common Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ impl SeqNum {
57
57
/// - 16_386 (i.e., 2^14)
58
58
/// - 2_097_152 (i.e., 2^21)
59
59
///
60
- /// This function will panic if `value` is out of bound w.r.t. `resolution`. That is if
60
+ /// # Errors
61
+ ///
62
+ /// This function will return an error if `value` is out of bound w.r.t. `resolution`. That is if
61
63
/// `value` is greater or equal than `resolution`.
62
64
///
63
65
pub ( crate ) fn make ( value : TransportSn , resolution : Bits ) -> ZResult < SeqNum > {
@@ -179,8 +181,10 @@ impl SeqNumGenerator {
179
181
/// As a consequence of wire zenoh's representation of sequence numbers
180
182
/// this should be a multiple of 7.
181
183
///
182
- /// This function will panic if `value` is out of bound w.r.t. `resolution`. That is if
183
- /// `value` is greater or equal than `resolution`.
184
+ /// # Errors
185
+ ///
186
+ /// This function will return an error if `initial_sn` is out of bound w.r.t. `resolution`. That is if
187
+ /// `initial_sn` is greater or equal than `resolution`.
184
188
///
185
189
pub ( crate ) fn make ( initial_sn : TransportSn , resolution : Bits ) -> ZResult < SeqNumGenerator > {
186
190
let sn = SeqNum :: make ( initial_sn, resolution) ?;
You can’t perform that action at this time.
0 commit comments