Coverage Report

Created: 2024-05-16 12:16

/__w/smoldot/smoldot/repo/lib/src/trie/nibble.rs
Line
Count
Source (jump to first uncovered line)
1
// Smoldot
2
// Copyright (C) 2019-2022  Parity Technologies (UK) Ltd.
3
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
4
5
// This program is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
// GNU General Public License for more details.
14
15
// You should have received a copy of the GNU General Public License
16
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
use core::fmt;
19
20
/// A single nibble with four bits.
21
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
22
pub struct Nibble(u8);
23
24
impl Nibble {
25
    /// Returns the equivalent of `Nibble::try_from(0).unwrap()`.
26
10.2M
    pub fn zero() -> Self {
27
10.2M
        Nibble(0)
28
10.2M
    }
_RNvMNtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB2_6Nibble4zero
Line
Count
Source
26
10.2M
    pub fn zero() -> Self {
27
10.2M
        Nibble(0)
28
10.2M
    }
Unexecuted instantiation: _RNvMNtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB2_6Nibble4zero
29
30
    /// Returns the equivalent of `Nibble::try_from(15).unwrap()`. It is the maximum possible value
31
    /// for a nibble.
32
18.3M
    pub fn max() -> Self {
33
18.3M
        Nibble(15)
34
18.3M
    }
_RNvMNtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB2_6Nibble3max
Line
Count
Source
32
18.3M
    pub fn max() -> Self {
33
18.3M
        Nibble(15)
34
18.3M
    }
_RNvMNtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB2_6Nibble3max
Line
Count
Source
32
2.66k
    pub fn max() -> Self {
33
2.66k
        Nibble(15)
34
2.66k
    }
35
36
    /// Add the given number to the nibble. Returns `None` on overflow.
37
7.96M
    pub fn checked_add(self, val: u8) -> Option<Self> {
38
7.96M
        let new_nibble = self.0.checked_add(val)
?0
;
39
7.96M
        if new_nibble >= 16 {
40
383k
            return None;
41
7.57M
        }
42
7.57M
        Some(Nibble(new_nibble))
43
7.96M
    }
_RNvMNtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB2_6Nibble11checked_add
Line
Count
Source
37
7.95M
    pub fn checked_add(self, val: u8) -> Option<Self> {
38
7.95M
        let new_nibble = self.0.checked_add(val)
?0
;
39
7.95M
        if new_nibble >= 16 {
40
383k
            return None;
41
7.57M
        }
42
7.57M
        Some(Nibble(new_nibble))
43
7.95M
    }
_RNvMNtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB2_6Nibble11checked_add
Line
Count
Source
37
1.30k
    pub fn checked_add(self, val: u8) -> Option<Self> {
38
1.30k
        let new_nibble = self.0.checked_add(val)
?0
;
39
1.30k
        if new_nibble >= 16 {
40
0
            return None;
41
1.30k
        }
42
1.30k
        Some(Nibble(new_nibble))
43
1.30k
    }
44
45
    /// Converts an ASCII headecimal digit (i.e. `0..9`, `a..f`, `A..F`) into a nibble.
46
    ///
47
    /// Returns `None` if `digit` is out of range.
48
10
    pub fn from_ascii_hex_digit(digit: u8) -> Option<Self> {
49
10
        if digit.is_ascii_digit() {
50
2
            Some(Nibble(digit - b'0'))
51
8
        } else if (b'a'..=b'f').contains(&digit) {
52
2
            Some(Nibble(10 + digit - b'a'))
53
6
        } else if (b'A'..=b'F').contains(&digit) {
54
2
            Some(Nibble(10 + digit - b'A'))
55
        } else {
56
4
            None
57
        }
58
10
    }
_RNvMNtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB2_6Nibble20from_ascii_hex_digit
Line
Count
Source
48
10
    pub fn from_ascii_hex_digit(digit: u8) -> Option<Self> {
49
10
        if digit.is_ascii_digit() {
50
2
            Some(Nibble(digit - b'0'))
51
8
        } else if (b'a'..=b'f').contains(&digit) {
52
2
            Some(Nibble(10 + digit - b'a'))
53
6
        } else if (b'A'..=b'F').contains(&digit) {
54
2
            Some(Nibble(10 + digit - b'A'))
55
        } else {
56
4
            None
57
        }
58
10
    }
Unexecuted instantiation: _RNvMNtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB2_6Nibble20from_ascii_hex_digit
59
}
60
61
impl TryFrom<u8> for Nibble {
62
    type Error = NibbleFromU8Error;
63
64
82.7M
    fn try_from(val: u8) -> Result<Self, Self::Error> {
65
82.7M
        if val < 16 {
66
81.7M
            Ok(Nibble(val))
67
        } else {
68
1.05M
            Err(NibbleFromU8Error::TooLarge)
69
        }
70
82.7M
    }
_RNvXs_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB4_6NibbleINtNtCsaYZPK01V26L_4core7convert7TryFromhE8try_from
Line
Count
Source
64
82.6M
    fn try_from(val: u8) -> Result<Self, Self::Error> {
65
82.6M
        if val < 16 {
66
81.5M
            Ok(Nibble(val))
67
        } else {
68
1.05M
            Err(NibbleFromU8Error::TooLarge)
69
        }
70
82.6M
    }
_RNvXs_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB4_6NibbleINtNtCsaYZPK01V26L_4core7convert7TryFromhE8try_from
Line
Count
Source
64
157k
    fn try_from(val: u8) -> Result<Self, Self::Error> {
65
157k
        if val < 16 {
66
157k
            Ok(Nibble(val))
67
        } else {
68
0
            Err(NibbleFromU8Error::TooLarge)
69
        }
70
157k
    }
71
}
72
73
impl From<Nibble> for u8 {
74
117M
    fn from(nibble: Nibble) -> u8 {
75
117M
        nibble.0
76
117M
    }
_RNvXs0_NtNtCsN16ciHI6Qf_7smoldot4trie6nibblehINtNtCsaYZPK01V26L_4core7convert4FromNtB5_6NibbleE4from
Line
Count
Source
74
117M
    fn from(nibble: Nibble) -> u8 {
75
117M
        nibble.0
76
117M
    }
_RNvXs0_NtNtCseuYC0Zibziv_7smoldot4trie6nibblehINtNtCsaYZPK01V26L_4core7convert4FromNtB5_6NibbleE4from
Line
Count
Source
74
86.1k
    fn from(nibble: Nibble) -> u8 {
75
86.1k
        nibble.0
76
86.1k
    }
77
}
78
79
impl From<Nibble> for usize {
80
27.1k
    fn from(nibble: Nibble) -> usize {
81
27.1k
        usize::from(nibble.0)
82
27.1k
    }
_RNvXs1_NtNtCsN16ciHI6Qf_7smoldot4trie6nibblejINtNtCsaYZPK01V26L_4core7convert4FromNtB5_6NibbleE4from
Line
Count
Source
80
27.1k
    fn from(nibble: Nibble) -> usize {
81
27.1k
        usize::from(nibble.0)
82
27.1k
    }
Unexecuted instantiation: _RNvXs1_NtNtCseuYC0Zibziv_7smoldot4trie6nibblejINtNtCsaYZPK01V26L_4core7convert4FromNtB5_6NibbleE4from
83
}
84
85
impl fmt::LowerHex for Nibble {
86
0
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
87
0
        fmt::LowerHex::fmt(&self.0, f)
88
0
    }
Unexecuted instantiation: _RNvXs2_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt8LowerHex3fmt
Unexecuted instantiation: _RNvXs2_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt8LowerHex3fmt
89
}
90
91
impl fmt::UpperHex for Nibble {
92
0
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
93
0
        fmt::UpperHex::fmt(&self.0, f)
94
0
    }
Unexecuted instantiation: _RNvXs3_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt8UpperHex3fmt
Unexecuted instantiation: _RNvXs3_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt8UpperHex3fmt
95
}
96
97
impl fmt::Debug for Nibble {
98
0
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
99
0
        write!(f, "{:x}", self.0)
100
0
    }
Unexecuted instantiation: _RNvXs4_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt5Debug3fmt
Unexecuted instantiation: _RNvXs4_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB5_6NibbleNtNtCsaYZPK01V26L_4core3fmt5Debug3fmt
101
}
102
103
/// Error when building a [`Nibble`] from a `u8`.
104
0
#[derive(Debug, derive_more::Display)]
Unexecuted instantiation: _RNvXsg_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleNtB5_17NibbleFromU8ErrorNtNtCsaYZPK01V26L_4core3fmt7Display3fmt
Unexecuted instantiation: _RNvXsg_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleNtB5_17NibbleFromU8ErrorNtNtCsaYZPK01V26L_4core3fmt7Display3fmt
105
pub enum NibbleFromU8Error {
106
    /// The integer value is too large.
107
    #[display(fmt = "Value is too large")]
108
    TooLarge,
109
}
110
111
/// Returns an iterator of all possible nibble values, in ascending order.
112
///
113
/// # Example
114
///
115
/// ```
116
/// assert_eq!(
117
///     smoldot::trie::all_nibbles().map(u8::from).collect::<Vec<_>>(),
118
///     &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
119
/// );
120
/// ```
121
0
pub fn all_nibbles() -> impl ExactSizeIterator<Item = Nibble> {
122
0
    (0..16).map(Nibble)
123
0
}
Unexecuted instantiation: _RNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble11all_nibbles
Unexecuted instantiation: _RNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble11all_nibbles
124
125
/// Turns an iterator of nibbles into an iterator of bytes.
126
///
127
/// If the number of nibbles is uneven, adds a `0` nibble at the end.
128
///
129
/// # Examples
130
///
131
/// ```
132
/// use smoldot::trie::{Nibble, nibbles_to_bytes_suffix_extend};
133
///
134
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap()];
135
/// assert_eq!(nibbles_to_bytes_suffix_extend(input.into_iter()).collect::<Vec<_>>(), &[0x5a]);
136
/// ```
137
///
138
/// ```
139
/// use smoldot::trie::{Nibble, nibbles_to_bytes_suffix_extend};
140
///
141
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap(), Nibble::try_from(0x9).unwrap()];
142
/// assert_eq!(nibbles_to_bytes_suffix_extend(input.into_iter()).collect::<Vec<_>>(), &[0x5a, 0x90]);
143
/// ```
144
8.47M
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
8.47M
    nibbles: I,
146
8.47M
) -> impl Iterator<Item = u8> {
147
8.47M
    struct Iter<I>(I);
148
8.47M
149
8.47M
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
8.47M
        type Item = u8;
151
8.47M
152
41.1M
        fn next(&mut self) -> Option<u8> {
153
41.1M
            let 
n132.6M
= self.0.next()
?8.45M
;
154
32.6M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
32.6M
            let byte = (n1.0 << 4) | n2.0;
156
32.6M
            Some(byte)
157
41.1M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB20_5slice4iter4IterNtB4_6NibbleEEINtNtB1W_5chain5ChainIB1S_INtNtB1W_4take4TakeB2L_EEINtNtNtB1Y_7sources4once4OnceB3c_EEEENtNtNtB1Y_6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
17.6M
        fn next(&mut self) -> Option<u8> {
153
17.6M
            let 
n115.5M
= self.0.next()
?2.02M
;
154
15.5M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
15.5M
            let byte = (n1.0 << 4) | n2.0;
156
15.5M
            Some(byte)
157
17.6M
        }
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtCsdZExvAaxgia_5alloc3vec3VechEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
1.74M
        fn next(&mut self) -> Option<u8> {
153
1.74M
            let 
n11.22M
= self.0.next()
?514k
;
154
1.22M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
1.22M
            let byte = (n1.0 << 4) | n2.0;
156
1.22M
            Some(byte)
157
1.74M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1v_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1t_6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
21.0M
        fn next(&mut self) -> Option<u8> {
153
21.0M
            let 
n115.1M
= self.0.next()
?5.89M
;
154
15.1M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
15.1M
            let byte = (n1.0 << 4) | n2.0;
156
15.1M
            Some(byte)
157
21.0M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1v_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1r_5chain5ChainINtNtB1r_6copied6CopiedIB2j_NtB4_6NibbleEEINtNtB1v_6option8IntoIterB3Z_EENCNvMB2L_NtB2L_9CalcInner26current_iter_node_full_key0EENtNtNtB1t_6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
5.12k
        fn next(&mut self) -> Option<u8> {
153
5.12k
            let 
n14.98k
= self.0.next()
?134
;
154
4.98k
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
4.98k
            let byte = (n1.0 << 4) | n2.0;
156
4.98k
            Some(byte)
157
5.12k
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterNtNtB6_13branch_search21BranchTrieNodeKeyIterENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
702
        fn next(&mut self) -> Option<u8> {
153
702
            let 
n1692
= self.0.next()
?10
;
154
692
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
692
            let byte = (n1.0 << 4) | n2.0;
156
692
            Some(byte)
157
702
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterRShEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
709k
        fn next(&mut self) -> Option<u8> {
153
709k
            let 
n1692k
= self.0.next()
?17.4k
;
154
692k
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
692k
            let byte = (n1.0 << 4) | n2.0;
156
692k
            Some(byte)
157
709k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNvMNtNtB8_8database11full_sqliteNtB38_18SqliteFullDatabase20to_chain_informations_00EENtNtNtB1u_6traits8iterator8Iterator4nextB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextB8_
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator4nextB8_
Line
Count
Source
152
38.2k
        fn next(&mut self) -> Option<u8> {
153
38.2k
            let 
n137.4k
= self.0.next()
?882
;
154
37.4k
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
37.4k
            let byte = (n1.0 << 4) | n2.0;
156
37.4k
            Some(byte)
157
38.2k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0se_00EENtNtNtB1u_6traits8iterator8Iterator4nextB3d_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
158
8.47M
159
8.47M
        fn size_hint(&self) -> (usize, Option<usize>) {
160
8.20M
            let (min, max) = self.0.size_hint();
161
16.4M
            fn conv(n: usize) -> usize {
162
16.4M
                // Add 1 to `n` in order to round up.
163
16.4M
                n.saturating_add(1) / 2
164
16.4M
            }
_RNvNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB4_4IterpENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint4conv
Line
Count
Source
161
16.3M
            fn conv(n: usize) -> usize {
162
16.3M
                // Add 1 to `n` in order to round up.
163
16.3M
                n.saturating_add(1) / 2
164
16.3M
            }
_RNvNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB4_4IterpENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint4conv
Line
Count
Source
161
37.6k
            fn conv(n: usize) -> usize {
162
37.6k
                // Add 1 to `n` in order to round up.
163
37.6k
                n.saturating_add(1) / 2
164
37.6k
            }
165
8.20M
            (conv(min), max.map(conv))
166
8.20M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB20_5slice4iter4IterNtB4_6NibbleEEINtNtB1W_5chain5ChainIB1S_INtNtB1W_4take4TakeB2L_EEINtNtNtB1Y_7sources4once4OnceB3c_EEEENtNtNtB1Y_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
1.86M
        fn size_hint(&self) -> (usize, Option<usize>) {
160
1.86M
            let (min, max) = self.0.size_hint();
161
1.86M
            fn conv(n: usize) -> usize {
162
1.86M
                // Add 1 to `n` in order to round up.
163
1.86M
                n.saturating_add(1) / 2
164
1.86M
            }
165
1.86M
            (conv(min), max.map(conv))
166
1.86M
        }
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtCsdZExvAaxgia_5alloc3vec3VechEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
452k
        fn size_hint(&self) -> (usize, Option<usize>) {
160
452k
            let (min, max) = self.0.size_hint();
161
452k
            fn conv(n: usize) -> usize {
162
452k
                // Add 1 to `n` in order to round up.
163
452k
                n.saturating_add(1) / 2
164
452k
            }
165
452k
            (conv(min), max.map(conv))
166
452k
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1v_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1t_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
5.86M
        fn size_hint(&self) -> (usize, Option<usize>) {
160
5.86M
            let (min, max) = self.0.size_hint();
161
5.86M
            fn conv(n: usize) -> usize {
162
5.86M
                // Add 1 to `n` in order to round up.
163
5.86M
                n.saturating_add(1) / 2
164
5.86M
            }
165
5.86M
            (conv(min), max.map(conv))
166
5.86M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1v_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1r_5chain5ChainINtNtB1r_6copied6CopiedIB2j_NtB4_6NibbleEEINtNtB1v_6option8IntoIterB3Z_EENCNvMB2L_NtB2L_9CalcInner26current_iter_node_full_key0EENtNtNtB1t_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
325
        fn size_hint(&self) -> (usize, Option<usize>) {
160
325
            let (min, max) = self.0.size_hint();
161
325
            fn conv(n: usize) -> usize {
162
325
                // Add 1 to `n` in order to round up.
163
325
                n.saturating_add(1) / 2
164
325
            }
165
325
            (conv(min), max.map(conv))
166
325
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterNtNtB6_13branch_search21BranchTrieNodeKeyIterENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
10
        fn size_hint(&self) -> (usize, Option<usize>) {
160
10
            let (min, max) = self.0.size_hint();
161
10
            fn conv(n: usize) -> usize {
162
10
                // Add 1 to `n` in order to round up.
163
10
                n.saturating_add(1) / 2
164
10
            }
165
10
            (conv(min), max.map(conv))
166
10
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterRShEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
17.4k
        fn size_hint(&self) -> (usize, Option<usize>) {
160
17.4k
            let (min, max) = self.0.size_hint();
161
17.4k
            fn conv(n: usize) -> usize {
162
17.4k
                // Add 1 to `n` in order to round up.
163
17.4k
                n.saturating_add(1) / 2
164
17.4k
            }
165
17.4k
            (conv(min), max.map(conv))
166
17.4k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNvMNtNtB8_8database11full_sqliteNtB38_18SqliteFullDatabase20to_chain_informations_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintB8_
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1w_5slice4iter4IterNtNtB6_14calculate_root4NodeEINtNtB1s_5chain5ChainINtNtB1s_6copied6CopiedIB2k_NtB4_6NibbleEEINtNtB1w_6option8IntoIterB40_EENCNvMB2M_NtB2M_9CalcInner26current_iter_node_full_key0EENtNtNtB1u_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
159
1.99k
        fn size_hint(&self) -> (usize, Option<usize>) {
160
1.99k
            let (min, max) = self.0.size_hint();
161
1.99k
            fn conv(n: usize) -> usize {
162
1.99k
                // Add 1 to `n` in order to round up.
163
1.99k
                n.saturating_add(1) / 2
164
1.99k
            }
165
1.99k
            (conv(min), max.map(conv))
166
1.99k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0se_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintB3d_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB21_5slice4iter4IterNtB4_6NibbleEEINtNtB1X_5chain5ChainIB1T_INtNtB1X_4take4TakeB2M_EEINtNtNtB1Z_7sources4once4OnceB3d_EEEENtNtNtB1Z_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtB6_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1s_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1o_INtNtNtB1w_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB45_14SyncBackground3run0s5_0s7_0EENCB3W_s8_0EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3c_14SyncBackground12author_block0s6_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EENtNtNtB1u_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
167
8.47M
    }
168
8.47M
169
8.47M
    Iter(nibbles)
170
8.47M
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1N_5slice4iter4IterNtB2_6NibbleEEINtNtB1J_5chain5ChainIB1F_INtNtB1J_4take4TakeB2y_EEINtNtNtB1L_7sources4once4OnceB2Z_EEEEB6_
Line
Count
Source
144
2.02M
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
2.02M
    nibbles: I,
146
2.02M
) -> impl Iterator<Item = u8> {
147
2.02M
    struct Iter<I>(I);
148
2.02M
149
2.02M
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
2.02M
        type Item = u8;
151
2.02M
152
2.02M
        fn next(&mut self) -> Option<u8> {
153
2.02M
            let n1 = self.0.next()?;
154
2.02M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
2.02M
            let byte = (n1.0 << 4) | n2.0;
156
2.02M
            Some(byte)
157
2.02M
        }
158
2.02M
159
2.02M
        fn size_hint(&self) -> (usize, Option<usize>) {
160
2.02M
            let (min, max) = self.0.size_hint();
161
2.02M
            fn conv(n: usize) -> usize {
162
2.02M
                // Add 1 to `n` in order to round up.
163
2.02M
                n.saturating_add(1) / 2
164
2.02M
            }
165
2.02M
            (conv(min), max.map(conv))
166
2.02M
        }
167
2.02M
    }
168
2.02M
169
2.02M
    Iter(nibbles)
170
2.02M
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1i_5slice4iter4IterNtB2_6NibbleEEEB6_
Line
Count
Source
144
5.89M
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
5.89M
    nibbles: I,
146
5.89M
) -> impl Iterator<Item = u8> {
147
5.89M
    struct Iter<I>(I);
148
5.89M
149
5.89M
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
5.89M
        type Item = u8;
151
5.89M
152
5.89M
        fn next(&mut self) -> Option<u8> {
153
5.89M
            let n1 = self.0.next()?;
154
5.89M
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
5.89M
            let byte = (n1.0 << 4) | n2.0;
156
5.89M
            Some(byte)
157
5.89M
        }
158
5.89M
159
5.89M
        fn size_hint(&self) -> (usize, Option<usize>) {
160
5.89M
            let (min, max) = self.0.size_hint();
161
5.89M
            fn conv(n: usize) -> usize {
162
5.89M
                // Add 1 to `n` in order to round up.
163
5.89M
                n.saturating_add(1) / 2
164
5.89M
            }
165
5.89M
            (conv(min), max.map(conv))
166
5.89M
        }
167
5.89M
    }
168
5.89M
169
5.89M
    Iter(nibbles)
170
5.89M
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1i_5slice4iter4IterNtNtB4_14calculate_root4NodeEINtNtB1e_5chain5ChainINtNtB1e_6copied6CopiedIB26_NtB2_6NibbleEEINtNtB1i_6option8IntoIterB3M_EENCNvMB2y_NtB2y_9CalcInner26current_iter_node_full_key0EEB6_
Line
Count
Source
144
134
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
134
    nibbles: I,
146
134
) -> impl Iterator<Item = u8> {
147
134
    struct Iter<I>(I);
148
134
149
134
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
134
        type Item = u8;
151
134
152
134
        fn next(&mut self) -> Option<u8> {
153
134
            let n1 = self.0.next()?;
154
134
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
134
            let byte = (n1.0 << 4) | n2.0;
156
134
            Some(byte)
157
134
        }
158
134
159
134
        fn size_hint(&self) -> (usize, Option<usize>) {
160
134
            let (min, max) = self.0.size_hint();
161
134
            fn conv(n: usize) -> usize {
162
134
                // Add 1 to `n` in order to round up.
163
134
                n.saturating_add(1) / 2
164
134
            }
165
134
            (conv(min), max.map(conv))
166
134
        }
167
134
    }
168
134
169
134
    Iter(nibbles)
170
134
}
Unexecuted instantiation: _RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterINtNtCsdZExvAaxgia_5alloc3vec3VechEEEB6_
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendNtNtB4_13branch_search21BranchTrieNodeKeyIterEB6_
Line
Count
Source
144
10
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
10
    nibbles: I,
146
10
) -> impl Iterator<Item = u8> {
147
10
    struct Iter<I>(I);
148
10
149
10
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
10
        type Item = u8;
151
10
152
10
        fn next(&mut self) -> Option<u8> {
153
10
            let n1 = self.0.next()?;
154
10
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
10
            let byte = (n1.0 << 4) | n2.0;
156
10
            Some(byte)
157
10
        }
158
10
159
10
        fn size_hint(&self) -> (usize, Option<usize>) {
160
10
            let (min, max) = self.0.size_hint();
161
10
            fn conv(n: usize) -> usize {
162
10
                // Add 1 to `n` in order to round up.
163
10
                n.saturating_add(1) / 2
164
10
            }
165
10
            (conv(min), max.map(conv))
166
10
        }
167
10
    }
168
10
169
10
    Iter(nibbles)
170
10
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEEB6_
Line
Count
Source
144
538k
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
538k
    nibbles: I,
146
538k
) -> impl Iterator<Item = u8> {
147
538k
    struct Iter<I>(I);
148
538k
149
538k
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
538k
        type Item = u8;
151
538k
152
538k
        fn next(&mut self) -> Option<u8> {
153
538k
            let n1 = self.0.next()?;
154
538k
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
538k
            let byte = (n1.0 << 4) | n2.0;
156
538k
            Some(byte)
157
538k
        }
158
538k
159
538k
        fn size_hint(&self) -> (usize, Option<usize>) {
160
538k
            let (min, max) = self.0.size_hint();
161
538k
            fn conv(n: usize) -> usize {
162
538k
                // Add 1 to `n` in order to round up.
163
538k
                n.saturating_add(1) / 2
164
538k
            }
165
538k
            (conv(min), max.map(conv))
166
538k
        }
167
538k
    }
168
538k
169
538k
    Iter(nibbles)
170
538k
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEECsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEECsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterRShEECsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEEB6_
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNvMNtNtB6_8database11full_sqliteNtB2V_18SqliteFullDatabase20to_chain_informations_00EEB6_
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEEB6_
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1O_5slice4iter4IterNtB2_6NibbleEEINtNtB1K_5chain5ChainIB1G_INtNtB1K_4take4TakeB2z_EEINtNtNtB1M_7sources4once4OnceB30_EEEEB6_
Line
Count
Source
144
17.4k
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
17.4k
    nibbles: I,
146
17.4k
) -> impl Iterator<Item = u8> {
147
17.4k
    struct Iter<I>(I);
148
17.4k
149
17.4k
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
17.4k
        type Item = u8;
151
17.4k
152
17.4k
        fn next(&mut self) -> Option<u8> {
153
17.4k
            let n1 = self.0.next()?;
154
17.4k
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
17.4k
            let byte = (n1.0 << 4) | n2.0;
156
17.4k
            Some(byte)
157
17.4k
        }
158
17.4k
159
17.4k
        fn size_hint(&self) -> (usize, Option<usize>) {
160
17.4k
            let (min, max) = self.0.size_hint();
161
17.4k
            fn conv(n: usize) -> usize {
162
17.4k
                // Add 1 to `n` in order to round up.
163
17.4k
                n.saturating_add(1) / 2
164
17.4k
            }
165
17.4k
            (conv(min), max.map(conv))
166
17.4k
        }
167
17.4k
    }
168
17.4k
169
17.4k
    Iter(nibbles)
170
17.4k
}
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters7flatten7FlatMapINtNtNtB1j_5slice4iter4IterNtNtB4_14calculate_root4NodeEINtNtB1f_5chain5ChainINtNtB1f_6copied6CopiedIB27_NtB2_6NibbleEEINtNtB1j_6option8IntoIterB3N_EENCNvMB2z_NtB2z_9CalcInner26current_iter_node_full_key0EEB6_
Line
Count
Source
144
882
pub fn nibbles_to_bytes_suffix_extend<I: Iterator<Item = Nibble>>(
145
882
    nibbles: I,
146
882
) -> impl Iterator<Item = u8> {
147
882
    struct Iter<I>(I);
148
882
149
882
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
150
882
        type Item = u8;
151
882
152
882
        fn next(&mut self) -> Option<u8> {
153
882
            let n1 = self.0.next()?;
154
882
            let n2 = self.0.next().unwrap_or(Nibble(0));
155
882
            let byte = (n1.0 << 4) | n2.0;
156
882
            Some(byte)
157
882
        }
158
882
159
882
        fn size_hint(&self) -> (usize, Option<usize>) {
160
882
            let (min, max) = self.0.size_hint();
161
882
            fn conv(n: usize) -> usize {
162
882
                // Add 1 to `n` in order to round up.
163
882
                n.saturating_add(1) / 2
164
882
            }
165
882
            (conv(min), max.map(conv))
166
882
        }
167
882
    }
168
882
169
882
    Iter(nibbles)
170
882
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEECsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB2Z_14SyncBackground12author_block0s6_00EECsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EECsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1f_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1b_INtNtNtB1j_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3S_14SyncBackground3run0s5_0s7_0EENCB3J_s8_0EECsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0se_00EEB30_
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB2Z_14SyncBackground12author_block0s6_00EECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1f_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1b_INtNtNtB1j_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3S_14SyncBackground3run0s5_0s7_0EENCB3J_s8_0EECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1f_5chain5ChainINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEIB1b_INtNtNtB1j_3ops5range5RangelENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB3S_14SyncBackground3run0s5_0s7_0EENCB3J_s8_0EECsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtB4_12proof_decode12EntryKeyIterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEECsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvMs_NtCsiUjFBJteJ7x_17smoldot_full_node17consensus_serviceNtB2Z_14SyncBackground12author_block0s6_00EECsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_suffix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhENCNCNCNvNtCsiUjFBJteJ7x_17smoldot_full_node17consensus_service12runtime_call0s7_00EECsibGXYHQB8Ea_25json_rpc_general_requests
171
172
/// Turns an iterator of nibbles into an iterator of bytes.
173
///
174
/// If the number of nibbles is uneven, adds a `0` nibble at the beginning.
175
///
176
/// # Examples
177
///
178
/// ```
179
/// use smoldot::trie::{Nibble, nibbles_to_bytes_prefix_extend};
180
///
181
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap()];
182
/// assert_eq!(nibbles_to_bytes_prefix_extend(input.into_iter()).collect::<Vec<_>>(), &[0x5a]);
183
/// ```
184
///
185
/// ```
186
/// use smoldot::trie::{Nibble, nibbles_to_bytes_prefix_extend};
187
///
188
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap(), Nibble::try_from(0x9).unwrap()];
189
/// assert_eq!(nibbles_to_bytes_prefix_extend(input.into_iter()).collect::<Vec<_>>(), &[0x05, 0xa9]);
190
/// ```
191
896k
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
896k
    nibbles: I,
193
896k
) -> impl ExactSizeIterator<Item = u8> {
194
896k
    struct Iter<I>(I, bool);
195
896k
196
896k
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
896k
        type Item = u8;
198
896k
199
2.07M
        fn next(&mut self) -> Option<u8> {
200
2.07M
            let 
n11.17M
= if self.1 {
201
896k
                self.1 = false;
202
408k
                Nibble(0)
203
896k
            } else {
204
1.66M
                self.0.next()
?896k
205
896k
            };
206
1.17M
            let n2 = self.0.next()
?0
;
207
1.17M
            let byte = (n1.0 << 4) | n2.0;
208
1.17M
            Some(byte)
209
2.07M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtB4_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
3
        fn next(&mut self) -> Option<u8> {
200
3
            let 
n12
= if self.1 {
201
0
                self.1 = false;
202
0
                Nibble(0)
203
            } else {
204
3
                self.0.next()
?1
205
            };
206
2
            let n2 = self.0.next()
?0
;
207
2
            let byte = (n1.0 << 4) | n2.0;
208
2
            Some(byte)
209
3
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
1.12M
        fn next(&mut self) -> Option<u8> {
200
1.12M
            let 
n1622k
= if self.1 {
201
234k
                self.1 = false;
202
234k
                Nibble(0)
203
            } else {
204
887k
                self.0.next()
?499k
205
            };
206
622k
            let n2 = self.0.next()
?0
;
207
622k
            let byte = (n1.0 << 4) | n2.0;
208
622k
            Some(byte)
209
1.12M
        }
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter7sources4once4OnceNtB4_6NibbleEENtNtNtB1t_6traits8iterator8Iterator4nextB8_
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter7sources5empty5EmptyNtB4_6NibbleEENtNtNtB1t_6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
3
        fn next(&mut self) -> Option<u8> {
200
3
            let 
n10
= if self.1 {
201
0
                self.1 = false;
202
0
                Nibble(0)
203
            } else {
204
3
                self.0.next()?
205
            };
206
0
            let n2 = self.0.next()?;
207
0
            let byte = (n1.0 << 4) | n2.0;
208
0
            Some(byte)
209
3
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1v_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1t_6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
815k
        fn next(&mut self) -> Option<u8> {
200
815k
            let 
n1449k
= if self.1 {
201
163k
                self.1 = false;
202
163k
                Nibble(0)
203
            } else {
204
652k
                self.0.next()
?366k
205
            };
206
449k
            let n2 = self.0.next()
?0
;
207
449k
            let byte = (n1.0 << 4) | n2.0;
208
449k
            Some(byte)
209
815k
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterNtNtB6_9trie_node17DecodedPartialKeyENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
88.2k
        fn next(&mut self) -> Option<u8> {
200
88.2k
            let 
n159.4k
= if self.1 {
201
10.2k
                self.1 = false;
202
10.2k
                Nibble(0)
203
            } else {
204
78.0k
                self.0.next()
?28.8k
205
            };
206
59.4k
            let n2 = self.0.next()
?0
;
207
59.4k
            let byte = (n1.0 << 4) | n2.0;
208
59.4k
            Some(byte)
209
88.2k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextB8_
Line
Count
Source
199
24.3k
        fn next(&mut self) -> Option<u8> {
200
24.3k
            let 
n123.3k
= if self.1 {
201
609
                self.1 = false;
202
609
                Nibble(0)
203
            } else {
204
23.7k
                self.0.next()
?1.00k
205
            };
206
23.3k
            let n2 = self.0.next()
?0
;
207
23.3k
            let byte = (n1.0 << 4) | n2.0;
208
23.3k
            Some(byte)
209
24.3k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterNtNtB6_9trie_node17DecodedPartialKeyENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB8_
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
199
2.31k
        fn next(&mut self) -> Option<u8> {
200
2.31k
            let 
n12.22k
= if self.1 {
201
58
                self.1 = false;
202
58
                Nibble(0)
203
            } else {
204
2.25k
                self.0.next()
?96
205
            };
206
2.22k
            let n2 = self.0.next()
?0
;
207
2.22k
            let byte = (n1.0 << 4) | n2.0;
208
2.22k
            Some(byte)
209
2.31k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
199
22.0k
        fn next(&mut self) -> Option<u8> {
200
22.0k
            let 
n121.0k
= if self.1 {
201
551
                self.1 = false;
202
551
                Nibble(0)
203
            } else {
204
21.4k
                self.0.next()
?912
205
            };
206
21.0k
            let n2 = self.0.next()
?0
;
207
21.0k
            let byte = (n1.0 << 4) | n2.0;
208
21.0k
            Some(byte)
209
22.0k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
210
896k
211
896k
        fn size_hint(&self) -> (usize, Option<usize>) {
212
0
            let inner_len = self.0.len();
213
896k
            let 
len0
= if
self.10
{
214
896k
                
debug_assert_eq!0
(
inner_len % 20
, 1);
215
896k
                
(inner_len / 2) + 10
216
896k
            } else {
217
896k
                
debug_assert_eq!0
(
inner_len % 20
, 0);
218
896k
                
inner_len / 20
219
896k
            };
220
896k
            (len, Some(len))
221
0
        }
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtB4_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter7sources4once4OnceNtB4_6NibbleEENtNtNtB1t_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter7sources5empty5EmptyNtB4_6NibbleEENtNtNtB1t_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1v_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1t_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterNtNtB6_9trie_node17DecodedPartialKeyENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterNtNtB6_9trie_node17DecodedPartialKeyENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB4_6NibbleEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1w_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1u_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
222
896k
    }
223
896k
224
896k
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
896k
226
896k
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
896k
    Iter(nibbles, has_prefix_nibble)
228
896k
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtB2_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEEB6_
Line
Count
Source
191
1
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
1
    nibbles: I,
193
1
) -> impl ExactSizeIterator<Item = u8> {
194
1
    struct Iter<I>(I, bool);
195
1
196
1
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
1
        type Item = u8;
198
1
199
1
        fn next(&mut self) -> Option<u8> {
200
1
            let n1 = if self.1 {
201
1
                self.1 = false;
202
1
                Nibble(0)
203
1
            } else {
204
1
                self.0.next()?
205
1
            };
206
1
            let n2 = self.0.next()?;
207
1
            let byte = (n1.0 << 4) | n2.0;
208
1
            Some(byte)
209
1
        }
210
1
211
1
        fn size_hint(&self) -> (usize, Option<usize>) {
212
1
            let inner_len = self.0.len();
213
1
            let len = if self.1 {
214
1
                debug_assert_eq!(inner_len % 2, 1);
215
1
                (inner_len / 2) + 1
216
1
            } else {
217
1
                debug_assert_eq!(inner_len % 2, 0);
218
1
                inner_len / 2
219
1
            };
220
1
            (len, Some(len))
221
1
        }
222
1
    }
223
1
224
1
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
1
226
1
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
1
    Iter(nibbles, has_prefix_nibble)
228
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEEB6_
Line
Count
Source
191
499k
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
499k
    nibbles: I,
193
499k
) -> impl ExactSizeIterator<Item = u8> {
194
499k
    struct Iter<I>(I, bool);
195
499k
196
499k
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
499k
        type Item = u8;
198
499k
199
499k
        fn next(&mut self) -> Option<u8> {
200
499k
            let n1 = if self.1 {
201
499k
                self.1 = false;
202
499k
                Nibble(0)
203
499k
            } else {
204
499k
                self.0.next()?
205
499k
            };
206
499k
            let n2 = self.0.next()?;
207
499k
            let byte = (n1.0 << 4) | n2.0;
208
499k
            Some(byte)
209
499k
        }
210
499k
211
499k
        fn size_hint(&self) -> (usize, Option<usize>) {
212
499k
            let inner_len = self.0.len();
213
499k
            let len = if self.1 {
214
499k
                debug_assert_eq!(inner_len % 2, 1);
215
499k
                (inner_len / 2) + 1
216
499k
            } else {
217
499k
                debug_assert_eq!(inner_len % 2, 0);
218
499k
                inner_len / 2
219
499k
            };
220
499k
            (len, Some(len))
221
499k
        }
222
499k
    }
223
499k
224
499k
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
499k
226
499k
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
499k
    Iter(nibbles, has_prefix_nibble)
228
499k
}
Unexecuted instantiation: _RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter7sources4once4OnceNtB2_6NibbleEEB6_
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter7sources5empty5EmptyNtB2_6NibbleEEB6_
Line
Count
Source
191
3
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
3
    nibbles: I,
193
3
) -> impl ExactSizeIterator<Item = u8> {
194
3
    struct Iter<I>(I, bool);
195
3
196
3
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
3
        type Item = u8;
198
3
199
3
        fn next(&mut self) -> Option<u8> {
200
3
            let n1 = if self.1 {
201
3
                self.1 = false;
202
3
                Nibble(0)
203
3
            } else {
204
3
                self.0.next()?
205
3
            };
206
3
            let n2 = self.0.next()?;
207
3
            let byte = (n1.0 << 4) | n2.0;
208
3
            Some(byte)
209
3
        }
210
3
211
3
        fn size_hint(&self) -> (usize, Option<usize>) {
212
3
            let inner_len = self.0.len();
213
3
            let len = if self.1 {
214
3
                debug_assert_eq!(inner_len % 2, 1);
215
3
                (inner_len / 2) + 1
216
3
            } else {
217
3
                debug_assert_eq!(inner_len % 2, 0);
218
3
                inner_len / 2
219
3
            };
220
3
            (len, Some(len))
221
3
        }
222
3
    }
223
3
224
3
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
3
226
3
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
3
    Iter(nibbles, has_prefix_nibble)
228
3
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1i_5slice4iter4IterNtB2_6NibbleEEEB6_
Line
Count
Source
191
366k
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
366k
    nibbles: I,
193
366k
) -> impl ExactSizeIterator<Item = u8> {
194
366k
    struct Iter<I>(I, bool);
195
366k
196
366k
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
366k
        type Item = u8;
198
366k
199
366k
        fn next(&mut self) -> Option<u8> {
200
366k
            let n1 = if self.1 {
201
366k
                self.1 = false;
202
366k
                Nibble(0)
203
366k
            } else {
204
366k
                self.0.next()?
205
366k
            };
206
366k
            let n2 = self.0.next()?;
207
366k
            let byte = (n1.0 << 4) | n2.0;
208
366k
            Some(byte)
209
366k
        }
210
366k
211
366k
        fn size_hint(&self) -> (usize, Option<usize>) {
212
366k
            let inner_len = self.0.len();
213
366k
            let len = if self.1 {
214
366k
                debug_assert_eq!(inner_len % 2, 1);
215
366k
                (inner_len / 2) + 1
216
366k
            } else {
217
366k
                debug_assert_eq!(inner_len % 2, 0);
218
366k
                inner_len / 2
219
366k
            };
220
366k
            (len, Some(len))
221
366k
        }
222
366k
    }
223
366k
224
366k
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
366k
226
366k
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
366k
    Iter(nibbles, has_prefix_nibble)
228
366k
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendNtNtB4_9trie_node17DecodedPartialKeyEB6_
Line
Count
Source
191
28.8k
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
28.8k
    nibbles: I,
193
28.8k
) -> impl ExactSizeIterator<Item = u8> {
194
28.8k
    struct Iter<I>(I, bool);
195
28.8k
196
28.8k
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
28.8k
        type Item = u8;
198
28.8k
199
28.8k
        fn next(&mut self) -> Option<u8> {
200
28.8k
            let n1 = if self.1 {
201
28.8k
                self.1 = false;
202
28.8k
                Nibble(0)
203
28.8k
            } else {
204
28.8k
                self.0.next()?
205
28.8k
            };
206
28.8k
            let n2 = self.0.next()?;
207
28.8k
            let byte = (n1.0 << 4) | n2.0;
208
28.8k
            Some(byte)
209
28.8k
        }
210
28.8k
211
28.8k
        fn size_hint(&self) -> (usize, Option<usize>) {
212
28.8k
            let inner_len = self.0.len();
213
28.8k
            let len = if self.1 {
214
28.8k
                debug_assert_eq!(inner_len % 2, 1);
215
28.8k
                (inner_len / 2) + 1
216
28.8k
            } else {
217
28.8k
                debug_assert_eq!(inner_len % 2, 0);
218
28.8k
                inner_len / 2
219
28.8k
            };
220
28.8k
            (len, Some(len))
221
28.8k
        }
222
28.8k
    }
223
28.8k
224
28.8k
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
28.8k
226
28.8k
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
28.8k
    Iter(nibbles, has_prefix_nibble)
228
28.8k
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEECsDDUKWWCHAU_18smoldot_light_wasm
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEEB6_
Line
Count
Source
191
1.00k
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
1.00k
    nibbles: I,
193
1.00k
) -> impl ExactSizeIterator<Item = u8> {
194
1.00k
    struct Iter<I>(I, bool);
195
1.00k
196
1.00k
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
1.00k
        type Item = u8;
198
1.00k
199
1.00k
        fn next(&mut self) -> Option<u8> {
200
1.00k
            let n1 = if self.1 {
201
1.00k
                self.1 = false;
202
1.00k
                Nibble(0)
203
1.00k
            } else {
204
1.00k
                self.0.next()?
205
1.00k
            };
206
1.00k
            let n2 = self.0.next()?;
207
1.00k
            let byte = (n1.0 << 4) | n2.0;
208
1.00k
            Some(byte)
209
1.00k
        }
210
1.00k
211
1.00k
        fn size_hint(&self) -> (usize, Option<usize>) {
212
1.00k
            let inner_len = self.0.len();
213
1.00k
            let len = if self.1 {
214
1.00k
                debug_assert_eq!(inner_len % 2, 1);
215
1.00k
                (inner_len / 2) + 1
216
1.00k
            } else {
217
1.00k
                debug_assert_eq!(inner_len % 2, 0);
218
1.00k
                inner_len / 2
219
1.00k
            };
220
1.00k
            (len, Some(len))
221
1.00k
        }
222
1.00k
    }
223
1.00k
224
1.00k
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
1.00k
226
1.00k
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
1.00k
    Iter(nibbles, has_prefix_nibble)
228
1.00k
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendNtNtB4_9trie_node17DecodedPartialKeyEB6_
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEECsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
191
96
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
96
    nibbles: I,
193
96
) -> impl ExactSizeIterator<Item = u8> {
194
96
    struct Iter<I>(I, bool);
195
96
196
96
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
96
        type Item = u8;
198
96
199
96
        fn next(&mut self) -> Option<u8> {
200
96
            let n1 = if self.1 {
201
96
                self.1 = false;
202
96
                Nibble(0)
203
96
            } else {
204
96
                self.0.next()?
205
96
            };
206
96
            let n2 = self.0.next()?;
207
96
            let byte = (n1.0 << 4) | n2.0;
208
96
            Some(byte)
209
96
        }
210
96
211
96
        fn size_hint(&self) -> (usize, Option<usize>) {
212
96
            let inner_len = self.0.len();
213
96
            let len = if self.1 {
214
96
                debug_assert_eq!(inner_len % 2, 1);
215
96
                (inner_len / 2) + 1
216
96
            } else {
217
96
                debug_assert_eq!(inner_len % 2, 0);
218
96
                inner_len / 2
219
96
            };
220
96
            (len, Some(len))
221
96
        }
222
96
    }
223
96
224
96
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
96
226
96
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
96
    Iter(nibbles, has_prefix_nibble)
228
96
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEECsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEECscDgN54JpMGG_6author
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEECsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
191
912
pub fn nibbles_to_bytes_prefix_extend<I: ExactSizeIterator<Item = Nibble>>(
192
912
    nibbles: I,
193
912
) -> impl ExactSizeIterator<Item = u8> {
194
912
    struct Iter<I>(I, bool);
195
912
196
912
    impl<I: ExactSizeIterator<Item = Nibble>> Iterator for Iter<I> {
197
912
        type Item = u8;
198
912
199
912
        fn next(&mut self) -> Option<u8> {
200
912
            let n1 = if self.1 {
201
912
                self.1 = false;
202
912
                Nibble(0)
203
912
            } else {
204
912
                self.0.next()?
205
912
            };
206
912
            let n2 = self.0.next()?;
207
912
            let byte = (n1.0 << 4) | n2.0;
208
912
            Some(byte)
209
912
        }
210
912
211
912
        fn size_hint(&self) -> (usize, Option<usize>) {
212
912
            let inner_len = self.0.len();
213
912
            let len = if self.1 {
214
912
                debug_assert_eq!(inner_len % 2, 1);
215
912
                (inner_len / 2) + 1
216
912
            } else {
217
912
                debug_assert_eq!(inner_len % 2, 0);
218
912
                inner_len / 2
219
912
            };
220
912
            (len, Some(len))
221
912
        }
222
912
    }
223
912
224
912
    impl<I: ExactSizeIterator<Item = Nibble>> ExactSizeIterator for Iter<I> {}
225
912
226
912
    let has_prefix_nibble = (nibbles.len() % 2) != 0;
227
912
    Iter(nibbles, has_prefix_nibble)
228
912
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble30nibbles_to_bytes_prefix_extendINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1j_5slice4iter4IterNtB2_6NibbleEEECsibGXYHQB8Ea_25json_rpc_general_requests
229
230
/// Turns an iterator of nibbles into an iterator of bytes.
231
///
232
/// If the number of nibbles is uneven, the last nibble is truncated.
233
///
234
/// # Examples
235
///
236
/// ```
237
/// use smoldot::trie::{Nibble, nibbles_to_bytes_truncate};
238
///
239
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap()];
240
/// assert_eq!(nibbles_to_bytes_truncate(input.into_iter()).collect::<Vec<_>>(), &[0x5a]);
241
/// ```
242
///
243
/// ```
244
/// use smoldot::trie::{Nibble, nibbles_to_bytes_truncate};
245
///
246
/// let input = [Nibble::try_from(0x5).unwrap(), Nibble::try_from(0xa).unwrap(), Nibble::try_from(0x9).unwrap()];
247
/// assert_eq!(nibbles_to_bytes_truncate(input.into_iter()).collect::<Vec<_>>(), &[0x5a]);
248
/// ```
249
482k
pub fn nibbles_to_bytes_truncate<I: Iterator<Item = Nibble>>(
250
482k
    nibbles: I,
251
482k
) -> impl Iterator<Item = u8> {
252
482k
    struct Iter<I>(I);
253
482k
254
482k
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
255
482k
        type Item = u8;
256
482k
257
5.11M
        fn next(&mut self) -> Option<u8> {
258
5.11M
            let 
n14.83M
= self.0.next()
?284k
;
259
4.83M
            let 
n24.64M
= self.0.next()
?181k
;
260
4.64M
            let byte = (n1.0 << 4) | n2.0;
261
4.64M
            Some(byte)
262
5.11M
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1q_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1o_6traits8iterator8Iterator4nextB8_
Line
Count
Source
257
4.84M
        fn next(&mut self) -> Option<u8> {
258
4.84M
            let 
n14.55M
= self.0.next()
?283k
;
259
4.55M
            let 
n24.37M
= self.0.next()
?179k
;
260
4.37M
            let byte = (n1.0 << 4) | n2.0;
261
4.37M
            Some(byte)
262
4.84M
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator4nextB8_
Line
Count
Source
257
270k
        fn next(&mut self) -> Option<u8> {
258
270k
            let 
n1269k
= self.0.next()
?420
;
259
269k
            let 
n2267k
= self.0.next()
?2.43k
;
260
267k
            let byte = (n1.0 << 4) | n2.0;
261
267k
            Some(byte)
262
270k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1n_6copied6CopiedINtNtNtB1r_5slice4iter4IterhEENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0s4_00EENtNtNtB1p_6traits8iterator8Iterator4nextB39_
Line
Count
Source
257
2.37k
        fn next(&mut self) -> Option<u8> {
258
2.37k
            let 
n12.32k
= self.0.next()
?49
;
259
2.32k
            let n2 = self.0.next()
?0
;
260
2.32k
            let byte = (n1.0 << 4) | n2.0;
261
2.32k
            Some(byte)
262
2.37k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
263
482k
264
482k
        fn size_hint(&self) -> (usize, Option<usize>) {
265
243k
            let (min, max) = self.0.size_hint();
266
486k
            fn conv(n: usize) -> usize {
267
486k
                n / 2
268
486k
            }
_RNvNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB4_4IterpENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint4conv
Line
Count
Source
266
485k
            fn conv(n: usize) -> usize {
267
485k
                n / 2
268
485k
            }
_RNvNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB4_4IterpENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint4conv
Line
Count
Source
266
98
            fn conv(n: usize) -> usize {
267
98
                n / 2
268
98
            }
269
243k
            (conv(min), max.map(conv))
270
243k
        }
_RNvXNvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1q_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1o_6traits8iterator8Iterator9size_hintB8_
Line
Count
Source
264
242k
        fn size_hint(&self) -> (usize, Option<usize>) {
265
242k
            let (min, max) = self.0.size_hint();
266
242k
            fn conv(n: usize) -> usize {
267
242k
                n / 2
268
242k
            }
269
242k
            (conv(min), max.map(conv))
270
242k
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator9size_hintB8_
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
_RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1n_6copied6CopiedINtNtNtB1r_5slice4iter4IterhEENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0s4_00EENtNtNtB1p_6traits8iterator8Iterator9size_hintB39_
Line
Count
Source
264
49
        fn size_hint(&self) -> (usize, Option<usize>) {
265
49
            let (min, max) = self.0.size_hint();
266
49
            fn conv(n: usize) -> usize {
267
49
                n / 2
268
49
            }
269
49
            (conv(min), max.map(conv))
270
49
        }
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXNvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtB2_4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1r_5slice4iter4IterNtB4_6NibbleEEENtNtNtB1p_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
271
482k
    }
272
482k
273
482k
    Iter(nibbles)
274
482k
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1d_5slice4iter4IterNtB2_6NibbleEEEB6_
Line
Count
Source
249
465k
pub fn nibbles_to_bytes_truncate<I: Iterator<Item = Nibble>>(
250
465k
    nibbles: I,
251
465k
) -> impl Iterator<Item = u8> {
252
465k
    struct Iter<I>(I);
253
465k
254
465k
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
255
465k
        type Item = u8;
256
465k
257
465k
        fn next(&mut self) -> Option<u8> {
258
465k
            let n1 = self.0.next()?;
259
465k
            let n2 = self.0.next()?;
260
465k
            let byte = (n1.0 << 4) | n2.0;
261
465k
            Some(byte)
262
465k
        }
263
465k
264
465k
        fn size_hint(&self) -> (usize, Option<usize>) {
265
465k
            let (min, max) = self.0.size_hint();
266
465k
            fn conv(n: usize) -> usize {
267
465k
                n / 2
268
465k
            }
269
465k
            (conv(min), max.map(conv))
270
465k
        }
271
465k
    }
272
465k
273
465k
    Iter(nibbles)
274
465k
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterNtB2_6NibbleEEECsDDUKWWCHAU_18smoldot_light_wasm
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterNtB2_6NibbleEEEB6_
Line
Count
Source
249
17.4k
pub fn nibbles_to_bytes_truncate<I: Iterator<Item = Nibble>>(
250
17.4k
    nibbles: I,
251
17.4k
) -> impl Iterator<Item = u8> {
252
17.4k
    struct Iter<I>(I);
253
17.4k
254
17.4k
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
255
17.4k
        type Item = u8;
256
17.4k
257
17.4k
        fn next(&mut self) -> Option<u8> {
258
17.4k
            let n1 = self.0.next()?;
259
17.4k
            let n2 = self.0.next()?;
260
17.4k
            let byte = (n1.0 << 4) | n2.0;
261
17.4k
            Some(byte)
262
17.4k
        }
263
17.4k
264
17.4k
        fn size_hint(&self) -> (usize, Option<usize>) {
265
17.4k
            let (min, max) = self.0.size_hint();
266
17.4k
            fn conv(n: usize) -> usize {
267
17.4k
                n / 2
268
17.4k
            }
269
17.4k
            (conv(min), max.map(conv))
270
17.4k
        }
271
17.4k
    }
272
17.4k
273
17.4k
    Iter(nibbles)
274
17.4k
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterNtB2_6NibbleEEECsiLzmwikkc22_14json_rpc_basic
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters3map3MapINtNtB1a_6copied6CopiedINtNtNtB1e_5slice4iter4IterhEENCNCNCNvNtNtCsiUjFBJteJ7x_17smoldot_full_node16json_rpc_service16requests_handler22spawn_requests_handler0s4_00EEB2W_
Line
Count
Source
249
49
pub fn nibbles_to_bytes_truncate<I: Iterator<Item = Nibble>>(
250
49
    nibbles: I,
251
49
) -> impl Iterator<Item = u8> {
252
49
    struct Iter<I>(I);
253
49
254
49
    impl<I: Iterator<Item = Nibble>> Iterator for Iter<I> {
255
49
        type Item = u8;
256
49
257
49
        fn next(&mut self) -> Option<u8> {
258
49
            let n1 = self.0.next()?;
259
49
            let n2 = self.0.next()?;
260
49
            let byte = (n1.0 << 4) | n2.0;
261
49
            Some(byte)
262
49
        }
263
49
264
49
        fn size_hint(&self) -> (usize, Option<usize>) {
265
49
            let (min, max) = self.0.size_hint();
266
49
            fn conv(n: usize) -> usize {
267
49
                n / 2
268
49
            }
269
49
            (conv(min), max.map(conv))
270
49
        }
271
49
    }
272
49
273
49
    Iter(nibbles)
274
49
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterNtB2_6NibbleEEECscDgN54JpMGG_6author
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble25nibbles_to_bytes_truncateINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterNtB2_6NibbleEEECsibGXYHQB8Ea_25json_rpc_general_requests
275
276
/// Turns an iterator of bytes into an iterator of nibbles corresponding to these bytes.
277
///
278
/// For each byte, the iterator yields a nibble containing the 4 most significant bits then a
279
/// nibble containing the 4 least significant bits.
280
10.8M
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
10.8M
    BytesToNibbles {
282
10.8M
        inner: bytes,
283
10.8M
        next: None,
284
10.8M
    }
285
10.8M
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNvB2_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB2_6NibbleEEEB6_
Line
Count
Source
280
218k
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
218k
    BytesToNibbles {
282
218k
        inner: bytes,
283
218k
        next: None,
284
218k
    }
285
218k
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EEB6_
Line
Count
Source
280
4
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
4
    BytesToNibbles {
282
4
        inner: bytes,
283
4
        next: None,
284
4
    }
285
4
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EEB6_
Line
Count
Source
280
2
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
2
    BytesToNibbles {
282
2
        inner: bytes,
283
2
        next: None,
284
2
    }
285
2
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB14_5slice4iter4IterhEEEB6_
Line
Count
Source
280
8
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
8
    BytesToNibbles {
282
8
        inner: bytes,
283
8
        next: None,
284
8
    }
285
8
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNvB2_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2i_5slice4iter4IterNtB2_6NibbleEEINtNtB2e_5chain5ChainIB2a_INtNtB2e_4take4TakeB33_EEINtNtNtB2g_7sources4once4OnceB3u_EEEEEB6_
Line
Count
Source
280
1.70M
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1.70M
    BytesToNibbles {
282
1.70M
        inner: bytes,
283
1.70M
        next: None,
284
1.70M
    }
285
1.70M
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNvB2_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1I_5slice4iter4IterNtB2_6NibbleEEEEB6_
Line
Count
Source
280
354k
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
354k
    BytesToNibbles {
282
354k
        inner: bytes,
283
354k
        next: None,
284
354k
    }
285
354k
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEB6_
Line
Count
Source
280
355
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
355
    BytesToNibbles {
282
355
        inner: bytes,
283
355
        next: None,
284
355
    }
285
355
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNvNtB6_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB6_8executor2vm11interpreterNtB29_11Interpreter11read_memory12AccessOffsetB1X_EEhEEB6_
Line
Count
Source
280
1
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1
    BytesToNibbles {
282
1
        inner: bytes,
283
1
        next: None,
284
1
    }
285
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNvNtB6_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1t_RShINtNvMs5_NtNtNtB6_8executor2vm11interpreterNtB2e_11Interpreter11read_memory12AccessOffsetB22_EEB22_EhEEB6_
Line
Count
Source
280
15
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
15
    BytesToNibbles {
282
15
        inner: bytes,
283
15
        next: None,
284
15
    }
285
15
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKje_EEB6_
Line
Count
Source
280
2
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
2
    BytesToNibbles {
282
2
        inner: bytes,
283
2
        next: None,
284
2
    }
285
2
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj10_EEB6_
Line
Count
Source
280
1
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1
    BytesToNibbles {
282
1
        inner: bytes,
283
1
        next: None,
284
1
    }
285
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj41_EEB6_
Line
Count
Source
280
1
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1
    BytesToNibbles {
282
1
        inner: bytes,
283
1
        next: None,
284
1
    }
285
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj40_EEB6_
Line
Count
Source
280
1
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1
    BytesToNibbles {
282
1
        inner: bytes,
283
1
        next: None,
284
1
    }
285
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj3f_EEB6_
Line
Count
Source
280
1
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
1
    BytesToNibbles {
282
1
        inner: bytes,
283
1
        next: None,
284
1
    }
285
1
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EEB6_
Line
Count
Source
280
2
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
2
    BytesToNibbles {
282
2
        inner: bytes,
283
2
        next: None,
284
2
    }
285
2
}
_RINvNtNtCsN16ciHI6Qf_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB14_5slice4iter4IterhEEEB6_
Line
Count
Source
280
8.61M
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
8.61M
    BytesToNibbles {
282
8.61M
        inner: bytes,
283
8.61M
        next: None,
284
8.61M
    }
285
8.61M
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEECsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNvNtB6_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB6_8executor2vm11interpreterNtB2a_11Interpreter11read_memory12AccessOffsetB1Y_EEhEEB6_
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNvNtB6_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1u_RShINtNvMs5_NtNtNtB6_8executor2vm11interpreterNtB2f_11Interpreter11read_memory12AccessOffsetB23_EEB23_EhEEB6_
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEEB6_
Line
Count
Source
280
2.85k
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
2.85k
    BytesToNibbles {
282
2.85k
        inner: bytes,
283
2.85k
        next: None,
284
2.85k
    }
285
2.85k
}
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEEB6_
Line
Count
Source
280
84
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
84
    BytesToNibbles {
282
84
        inner: bytes,
283
84
        next: None,
284
84
    }
285
84
}
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEECsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
280
74
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
74
    BytesToNibbles {
282
74
        inner: bytes,
283
74
        next: None,
284
74
    }
285
74
}
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEECsiUjFBJteJ7x_17smoldot_full_node
Line
Count
Source
280
11
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
11
    BytesToNibbles {
282
11
        inner: bytes,
283
11
        next: None,
284
11
    }
285
11
}
Unexecuted instantiation: _RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEECscDgN54JpMGG_6author
_RINvNtNtCseuYC0Zibziv_7smoldot4trie6nibble16bytes_to_nibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB15_5slice4iter4IterhEEECsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
280
703
pub fn bytes_to_nibbles<I>(bytes: I) -> BytesToNibbles<I> {
281
703
    BytesToNibbles {
282
703
        inner: bytes,
283
703
        next: None,
284
703
    }
285
703
}
286
287
/// Turns an iterator of bytes into an iterator of nibbles corresponding to these bytes.
288
#[derive(Debug, Copy, Clone)]
289
pub struct BytesToNibbles<I> {
290
    inner: I,
291
    next: Option<Nibble>,
292
}
293
294
impl<I: Iterator<Item = u8>> Iterator for BytesToNibbles<I> {
295
    type Item = Nibble;
296
297
48.8M
    fn next(&mut self) -> Option<Nibble> {
298
48.8M
        if let Some(
next18.6M
) = self.next.take() {
299
18.6M
            return Some(next);
300
30.2M
        }
301
302
30.2M
        let 
byte19.9M
= self.inner.next()
?10.2M
;
303
19.9M
        self.next = Some(Nibble(byte & 0xf));
304
19.9M
        Some(Nibble(byte >> 4))
305
48.8M
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
2
    fn next(&mut self) -> Option<Nibble> {
298
2
        if let Some(
next0
) = self.next.take() {
299
0
            return Some(next);
300
2
        }
301
302
2
        let 
byte0
= self.inner.next()?;
303
0
        self.next = Some(Nibble(byte & 0xf));
304
0
        Some(Nibble(byte >> 4))
305
2
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj10_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
33
    fn next(&mut self) -> Option<Nibble> {
298
33
        if let Some(
next16
) = self.next.take() {
299
16
            return Some(next);
300
17
        }
301
302
17
        let 
byte16
= self.inner.next()
?1
;
303
16
        self.next = Some(Nibble(byte & 0xf));
304
16
        Some(Nibble(byte >> 4))
305
33
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
6
    fn next(&mut self) -> Option<Nibble> {
298
6
        if let Some(
next2
) = self.next.take() {
299
2
            return Some(next);
300
4
        }
301
302
4
        let 
byte2
= self.inner.next()
?2
;
303
2
        self.next = Some(Nibble(byte & 0xf));
304
2
        Some(Nibble(byte >> 4))
305
6
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj3f_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
127
    fn next(&mut self) -> Option<Nibble> {
298
127
        if let Some(
next63
) = self.next.take() {
299
63
            return Some(next);
300
64
        }
301
302
64
        let 
byte63
= self.inner.next()
?1
;
303
63
        self.next = Some(Nibble(byte & 0xf));
304
63
        Some(Nibble(byte >> 4))
305
127
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj40_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
129
    fn next(&mut self) -> Option<Nibble> {
298
129
        if let Some(
next64
) = self.next.take() {
299
64
            return Some(next);
300
65
        }
301
302
65
        let 
byte64
= self.inner.next()
?1
;
303
64
        self.next = Some(Nibble(byte & 0xf));
304
64
        Some(Nibble(byte >> 4))
305
129
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj41_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
129
    fn next(&mut self) -> Option<Nibble> {
298
129
        if let Some(
next64
) = self.next.take() {
299
64
            return Some(next);
300
65
        }
301
302
65
        let byte = self.inner.next()
?0
;
303
65
        self.next = Some(Nibble(byte & 0xf));
304
65
        Some(Nibble(byte >> 4))
305
129
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
36
    fn next(&mut self) -> Option<Nibble> {
298
36
        if let Some(
next16
) = self.next.take() {
299
16
            return Some(next);
300
20
        }
301
302
20
        let 
byte16
= self.inner.next()
?4
;
303
16
        self.next = Some(Nibble(byte & 0xf));
304
16
        Some(Nibble(byte >> 4))
305
36
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKje_EENtNtNtNtB19_4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
57
    fn next(&mut self) -> Option<Nibble> {
298
57
        if let Some(
next28
) = self.next.take() {
299
28
            return Some(next);
300
29
        }
301
302
29
        let 
byte28
= self.inner.next()
?1
;
303
28
        self.next = Some(Nibble(byte & 0xf));
304
28
        Some(Nibble(byte >> 4))
305
57
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
31.0k
    fn next(&mut self) -> Option<Nibble> {
298
31.0k
        if let Some(
next15.3k
) = self.next.take() {
299
15.3k
            return Some(next);
300
15.7k
        }
301
302
15.7k
        let 
byte15.4k
= self.inner.next()
?251
;
303
15.4k
        self.next = Some(Nibble(byte & 0xf));
304
15.4k
        Some(Nibble(byte >> 4))
305
31.0k
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB1b_5slice4iter4IterhEEENtNtNtB19_6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
14
    fn next(&mut self) -> Option<Nibble> {
298
14
        if let Some(
next5
) = self.next.take() {
299
5
            return Some(next);
300
9
        }
301
302
9
        let 
byte5
= self.inner.next()
?4
;
303
5
        self.next = Some(Nibble(byte & 0xf));
304
5
        Some(Nibble(byte >> 4))
305
14
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1b_5slice4iter4IterhEEENtNtNtB19_6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
40.6M
    fn next(&mut self) -> Option<Nibble> {
298
40.6M
        if let Some(
next15.6M
) = self.next.take() {
299
15.6M
            return Some(next);
300
25.0M
        }
301
302
25.0M
        let 
byte17.0M
= self.inner.next()
?8.01M
;
303
17.0M
        self.next = Some(Nibble(byte & 0xf));
304
17.0M
        Some(Nibble(byte >> 4))
305
40.6M
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1P_5slice4iter4IterNtB5_6NibbleEEEENtNtNtB1N_6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
627k
    fn next(&mut self) -> Option<Nibble> {
298
627k
        if let Some(
next136k
) = self.next.take() {
299
136k
            return Some(next);
300
490k
        }
301
302
490k
        let 
byte136k
= self.inner.next()
?354k
;
303
136k
        self.next = Some(Nibble(byte & 0xf));
304
136k
        Some(Nibble(byte >> 4))
305
627k
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2p_5slice4iter4IterNtB5_6NibbleEEINtNtB2l_5chain5ChainIB2h_INtNtB2l_4take4TakeB3a_EEINtNtNtB2n_7sources4once4OnceB3B_EEEEENtNtNtB2n_6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
6.21M
    fn next(&mut self) -> Option<Nibble> {
298
6.21M
        if let Some(
next2.25M
) = self.next.take() {
299
2.25M
            return Some(next);
300
3.96M
        }
301
302
3.96M
        let 
byte2.25M
= self.inner.next()
?1.70M
;
303
2.25M
        self.next = Some(Nibble(byte & 0xf));
304
2.25M
        Some(Nibble(byte >> 4))
305
6.21M
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB5_6NibbleEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
878k
    fn next(&mut self) -> Option<Nibble> {
298
878k
        if let Some(
next330k
) = self.next.take() {
299
330k
            return Some(next);
300
547k
        }
301
302
547k
        let 
byte352k
= self.inner.next()
?194k
;
303
352k
        self.next = Some(Nibble(byte & 0xf));
304
352k
        Some(Nibble(byte >> 4))
305
878k
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1A_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2l_11Interpreter11read_memory12AccessOffsetB29_EEB29_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
847
    fn next(&mut self) -> Option<Nibble> {
298
847
        if let Some(
next416
) = self.next.take() {
299
416
            return Some(next);
300
431
        }
301
302
431
        let 
byte416
= self.inner.next()
?15
;
303
416
        self.next = Some(Nibble(byte & 0xf));
304
416
        Some(Nibble(byte >> 4))
305
847
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2g_11Interpreter11read_memory12AccessOffsetB24_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
65
    fn next(&mut self) -> Option<Nibble> {
298
65
        if let Some(
next32
) = self.next.take() {
299
32
            return Some(next);
300
33
        }
301
302
33
        let 
byte32
= self.inner.next()
?1
;
303
32
        self.next = Some(Nibble(byte & 0xf));
304
32
        Some(Nibble(byte >> 4))
305
65
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
201k
    fn next(&mut self) -> Option<Nibble> {
298
201k
        if let Some(
next99.4k
) = self.next.take() {
299
99.4k
            return Some(next);
300
102k
        }
301
302
102k
        let 
byte100k
= self.inner.next()
?1.99k
;
303
100k
        self.next = Some(Nibble(byte & 0xf));
304
100k
        Some(Nibble(byte >> 4))
305
201k
    }
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextB9_
Line
Count
Source
297
2.89k
    fn next(&mut self) -> Option<Nibble> {
298
2.89k
        if let Some(
next1.40k
) = self.next.take() {
299
1.40k
            return Some(next);
300
1.49k
        }
301
302
1.49k
        let 
byte1.40k
= self.inner.next()
?84
;
303
1.40k
        self.next = Some(Nibble(byte & 0xf));
304
1.40k
        Some(Nibble(byte >> 4))
305
2.89k
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextB9_
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
297
17.8k
    fn next(&mut self) -> Option<Nibble> {
298
17.8k
        if let Some(
next8.78k
) = self.next.take() {
299
8.78k
            return Some(next);
300
9.05k
        }
301
302
9.05k
        let 
byte8.91k
= self.inner.next()
?140
;
303
8.91k
        self.next = Some(Nibble(byte & 0xf));
304
8.91k
        Some(Nibble(byte >> 4))
305
17.8k
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiLzmwikkc22_14json_rpc_basic
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextCsiUjFBJteJ7x_17smoldot_full_node
Line
Count
Source
297
111
    fn next(&mut self) -> Option<Nibble> {
298
111
        if let Some(
next50
) = self.next.take() {
299
50
            return Some(next);
300
61
        }
301
302
61
        let 
byte50
= self.inner.next()
?11
;
303
50
        self.next = Some(Nibble(byte & 0xf));
304
50
        Some(Nibble(byte >> 4))
305
111
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCscDgN54JpMGG_6author
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
297
169k
    fn next(&mut self) -> Option<Nibble> {
298
169k
        if let Some(
next83.4k
) = self.next.take() {
299
83.4k
            return Some(next);
300
86.0k
        }
301
302
86.0k
        let 
byte84.7k
= self.inner.next()
?1.33k
;
303
84.7k
        self.next = Some(Nibble(byte & 0xf));
304
84.7k
        Some(Nibble(byte >> 4))
305
169k
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator4nextCsibGXYHQB8Ea_25json_rpc_general_requests
306
307
8.86M
    fn size_hint(&self) -> (usize, Option<usize>) {
308
8.86M
        let (min, max) = self.inner.size_hint();
309
8.86M
310
8.86M
        if self.next.is_some() {
311
8.44M
            (
312
8.44M
                min.saturating_mul(2).saturating_add(1),
313
8.44M
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hint0Bb_
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
2
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
4
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
250
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
3
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
6.58M
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1R_5slice4iter4IterNtB7_6NibbleEEEENtNtNtB1P_6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
136k
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2r_5slice4iter4IterNtB7_6NibbleEEINtNtB2n_5chain5ChainIB2j_INtNtB2n_4take4TakeB3c_EEINtNtNtB2p_7sources4once4OnceB3D_EEEEENtNtNtB2p_6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
1.54M
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB7_6NibbleEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
165k
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1C_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2n_11Interpreter11read_memory12AccessOffsetB2b_EEB2b_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
13
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2i_11Interpreter11read_memory12AccessOffsetB26_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
1
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0CsDDUKWWCHAU_18smoldot_light_wasm
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
1.99k
                max.and_then(|max| max.checked_mul(2))
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0Bb_
Line
Count
Source
313
84
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0Bb_
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0CsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
313
16
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsiLzmwikkc22_14json_rpc_basic
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0CsiUjFBJteJ7x_17smoldot_full_node
Line
Count
Source
313
6
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CscDgN54JpMGG_6author
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hint0CsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
313
152
                max.and_then(|max| max.checked_mul(2))
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hint0CsibGXYHQB8Ea_25json_rpc_general_requests
314
8.44M
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints_0Bb_
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
2
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
4
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
250
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
3
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
6.58M
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1R_5slice4iter4IterNtB7_6NibbleEEEENtNtNtB1P_6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
136k
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2r_5slice4iter4IterNtB7_6NibbleEEINtNtB2n_5chain5ChainIB2j_INtNtB2n_4take4TakeB3c_EEINtNtNtB2p_7sources4once4OnceB3D_EEEEENtNtNtB2p_6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
1.54M
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB7_6NibbleEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
165k
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1C_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2n_11Interpreter11read_memory12AccessOffsetB2b_EEB2b_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
13
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2i_11Interpreter11read_memory12AccessOffsetB26_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
1
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0CsDDUKWWCHAU_18smoldot_light_wasm
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
1.99k
                    .and_then(|max| max.checked_add(1)),
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0Bb_
Line
Count
Source
314
84
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0Bb_
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0CsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
314
16
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsiLzmwikkc22_14json_rpc_basic
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0CsiUjFBJteJ7x_17smoldot_full_node
Line
Count
Source
314
6
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CscDgN54JpMGG_6author
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints_0CsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
314
152
                    .and_then(|max| max.checked_add(1)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints_0CsibGXYHQB8Ea_25json_rpc_general_requests
315
8.44M
            )
316
        } else {
317
424k
            (
318
424k
                min.saturating_mul(2),
319
424k
                max.and_then(|max| max.checked_mul(2)),
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EENtNtNtNtB1b_4iter6traits8iterator8Iterator9size_hints0_0Bb_
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Line
Count
Source
319
4
                max.and_then(|max| max.checked_mul(2)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hints0_0Bb_
Line
Count
Source
319
4
                max.and_then(|max| max.checked_mul(2)),
_RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1d_5slice4iter4IterhEEENtNtNtB1b_6traits8iterator8Iterator9size_hints0_0Bb_
Line
Count
Source
319
423k
                max.and_then(|max| max.checked_mul(2)),
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1R_5slice4iter4IterNtB7_6NibbleEEEENtNtNtB1P_6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2r_5slice4iter4IterNtB7_6NibbleEEINtNtB2n_5chain5ChainIB2j_INtNtB2n_4take4TakeB3c_EEINtNtNtB2p_7sources4once4OnceB3D_EEEEENtNtNtB2p_6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvB7_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB7_6NibbleEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1C_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2n_11Interpreter11read_memory12AccessOffsetB2b_EEB2b_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2i_11Interpreter11read_memory12AccessOffsetB26_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0CsDDUKWWCHAU_18smoldot_light_wasm
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0Bb_
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0CsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
319
58
                max.and_then(|max| max.checked_mul(2)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CscDgN54JpMGG_6author
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CscDgN54JpMGG_6author
_RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1e_5slice4iter4IterhEEENtNtNtB1c_6traits8iterator8Iterator9size_hints0_0CsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
319
551
                max.and_then(|max| max.checked_mul(2)),
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1D_RShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2o_11Interpreter11read_memory12AccessOffsetB2c_EEB2c_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNCNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB7_14BytesToNibblesINtNvNtBb_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtBb_8executor2vm11interpreterNtB2j_11Interpreter11read_memory12AccessOffsetB27_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hints0_0CsibGXYHQB8Ea_25json_rpc_general_requests
320
424k
            )
321
        }
322
8.86M
    }
Unexecuted instantiation: _RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj0_EENtNtNtNtB19_4iter6traits8iterator8Iterator9size_hintB9_
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj1_EENtNtNtNtB19_4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
2
    fn size_hint(&self) -> (usize, Option<usize>) {
308
2
        let (min, max) = self.inner.size_hint();
309
2
310
2
        if self.next.is_some() {
311
2
            (
312
2
                min.saturating_mul(2).saturating_add(1),
313
2
                max.and_then(|max| max.checked_mul(2))
314
2
                    .and_then(|max| max.checked_add(1)),
315
2
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
2
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsaYZPK01V26L_4core5array4iter8IntoIterhKj4_EENtNtNtNtB19_4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
4
    fn size_hint(&self) -> (usize, Option<usize>) {
308
4
        let (min, max) = self.inner.size_hint();
309
4
310
4
        if self.next.is_some() {
311
4
            (
312
4
                min.saturating_mul(2).saturating_add(1),
313
4
                max.and_then(|max| max.checked_mul(2))
314
4
                    .and_then(|max| max.checked_add(1)),
315
4
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
4
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
254
    fn size_hint(&self) -> (usize, Option<usize>) {
308
254
        let (min, max) = self.inner.size_hint();
309
254
310
254
        if self.next.is_some() {
311
250
            (
312
250
                min.saturating_mul(2).saturating_add(1),
313
250
                max.and_then(|max| max.checked_mul(2))
314
250
                    .and_then(|max| max.checked_add(1)),
315
250
            )
316
        } else {
317
4
            (
318
4
                min.saturating_mul(2),
319
4
                max.and_then(|max| max.checked_mul(2)),
320
4
            )
321
        }
322
254
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6cloned6ClonedINtNtNtB1b_5slice4iter4IterhEEENtNtNtB19_6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
7
    fn size_hint(&self) -> (usize, Option<usize>) {
308
7
        let (min, max) = self.inner.size_hint();
309
7
310
7
        if self.next.is_some() {
311
3
            (
312
3
                min.saturating_mul(2).saturating_add(1),
313
3
                max.and_then(|max| max.checked_mul(2))
314
3
                    .and_then(|max| max.checked_add(1)),
315
3
            )
316
        } else {
317
4
            (
318
4
                min.saturating_mul(2),
319
4
                max.and_then(|max| max.checked_mul(2)),
320
4
            )
321
        }
322
7
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1b_5slice4iter4IterhEEENtNtNtB19_6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
7.01M
    fn size_hint(&self) -> (usize, Option<usize>) {
308
7.01M
        let (min, max) = self.inner.size_hint();
309
7.01M
310
7.01M
        if self.next.is_some() {
311
6.58M
            (
312
6.58M
                min.saturating_mul(2).saturating_add(1),
313
6.58M
                max.and_then(|max| max.checked_mul(2))
314
6.58M
                    .and_then(|max| max.checked_add(1)),
315
6.58M
            )
316
        } else {
317
423k
            (
318
423k
                min.saturating_mul(2),
319
423k
                max.and_then(|max| max.checked_mul(2)),
320
423k
            )
321
        }
322
7.01M
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_25nibbles_to_bytes_truncate4IterINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1P_5slice4iter4IterNtB5_6NibbleEEEENtNtNtB1N_6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
136k
    fn size_hint(&self) -> (usize, Option<usize>) {
308
136k
        let (min, max) = self.inner.size_hint();
309
136k
310
136k
        if self.next.is_some() {
311
136k
            (
312
136k
                min.saturating_mul(2).saturating_add(1),
313
136k
                max.and_then(|max| max.checked_mul(2))
314
136k
                    .and_then(|max| max.checked_add(1)),
315
136k
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
136k
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_30nibbles_to_bytes_suffix_extend4IterINtCs1qmLyiTSqYF_6either6EitherINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB2p_5slice4iter4IterNtB5_6NibbleEEINtNtB2l_5chain5ChainIB2h_INtNtB2l_4take4TakeB3a_EEINtNtNtB2n_7sources4once4OnceB3B_EEEEENtNtNtB2n_6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
1.54M
    fn size_hint(&self) -> (usize, Option<usize>) {
308
1.54M
        let (min, max) = self.inner.size_hint();
309
1.54M
310
1.54M
        if self.next.is_some() {
311
1.54M
            (
312
1.54M
                min.saturating_mul(2).saturating_add(1),
313
1.54M
                max.and_then(|max| max.checked_mul(2))
314
1.54M
                    .and_then(|max| max.checked_add(1)),
315
1.54M
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
1.54M
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvB5_30nibbles_to_bytes_suffix_extend4IterINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterNtB5_6NibbleEEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
165k
    fn size_hint(&self) -> (usize, Option<usize>) {
308
165k
        let (min, max) = self.inner.size_hint();
309
165k
310
165k
        if self.next.is_some() {
311
165k
            (
312
165k
                min.saturating_mul(2).saturating_add(1),
313
165k
                max.and_then(|max| max.checked_mul(2))
314
165k
                    .and_then(|max| max.checked_add(1)),
315
165k
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
165k
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1A_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2l_11Interpreter11read_memory12AccessOffsetB29_EEB29_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
13
    fn size_hint(&self) -> (usize, Option<usize>) {
308
13
        let (min, max) = self.inner.size_hint();
309
13
310
13
        if self.next.is_some() {
311
13
            (
312
13
                min.saturating_mul(2).saturating_add(1),
313
13
                max.and_then(|max| max.checked_mul(2))
314
13
                    .and_then(|max| max.checked_add(1)),
315
13
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
13
    }
_RNvXs5_NtNtCsN16ciHI6Qf_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2g_11Interpreter11read_memory12AccessOffsetB24_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
1
    fn size_hint(&self) -> (usize, Option<usize>) {
308
1
        let (min, max) = self.inner.size_hint();
309
1
310
1
        if self.next.is_some() {
311
1
            (
312
1
                min.saturating_mul(2).saturating_add(1),
313
1
                max.and_then(|max| max.checked_mul(2))
314
1
                    .and_then(|max| max.checked_add(1)),
315
1
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
1
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintCsDDUKWWCHAU_18smoldot_light_wasm
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtCsdZExvAaxgia_5alloc3vec9into_iter8IntoIterhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
1.99k
    fn size_hint(&self) -> (usize, Option<usize>) {
308
1.99k
        let (min, max) = self.inner.size_hint();
309
1.99k
310
1.99k
        if self.next.is_some() {
311
1.99k
            (
312
1.99k
                min.saturating_mul(2).saturating_add(1),
313
1.99k
                max.and_then(|max| max.checked_mul(2))
314
1.99k
                    .and_then(|max| max.checked_add(1)),
315
1.99k
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
1.99k
    }
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintB9_
Line
Count
Source
307
84
    fn size_hint(&self) -> (usize, Option<usize>) {
308
84
        let (min, max) = self.inner.size_hint();
309
84
310
84
        if self.next.is_some() {
311
84
            (
312
84
                min.saturating_mul(2).saturating_add(1),
313
84
                max.and_then(|max| max.checked_mul(2))
314
84
                    .and_then(|max| max.checked_add(1)),
315
84
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
84
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintB9_
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Line
Count
Source
307
74
    fn size_hint(&self) -> (usize, Option<usize>) {
308
74
        let (min, max) = self.inner.size_hint();
309
74
310
74
        if self.next.is_some() {
311
16
            (
312
16
                min.saturating_mul(2).saturating_add(1),
313
16
                max.and_then(|max| max.checked_mul(2))
314
16
                    .and_then(|max| max.checked_add(1)),
315
16
            )
316
        } else {
317
58
            (
318
58
                min.saturating_mul(2),
319
58
                max.and_then(|max| max.checked_mul(2)),
320
58
            )
321
        }
322
74
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiLzmwikkc22_14json_rpc_basic
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintCsiUjFBJteJ7x_17smoldot_full_node
Line
Count
Source
307
6
    fn size_hint(&self) -> (usize, Option<usize>) {
308
6
        let (min, max) = self.inner.size_hint();
309
6
310
6
        if self.next.is_some() {
311
6
            (
312
6
                min.saturating_mul(2).saturating_add(1),
313
6
                max.and_then(|max| max.checked_mul(2))
314
6
                    .and_then(|max| max.checked_add(1)),
315
6
            )
316
        } else {
317
0
            (
318
0
                min.saturating_mul(2),
319
0
                max.and_then(|max| max.checked_mul(2)),
320
0
            )
321
        }
322
6
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsiUjFBJteJ7x_17smoldot_full_node
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCscDgN54JpMGG_6author
_RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNtNtNtCsaYZPK01V26L_4core4iter8adapters6copied6CopiedINtNtNtB1c_5slice4iter4IterhEEENtNtNtB1a_6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Line
Count
Source
307
703
    fn size_hint(&self) -> (usize, Option<usize>) {
308
703
        let (min, max) = self.inner.size_hint();
309
703
310
703
        if self.next.is_some() {
311
152
            (
312
152
                min.saturating_mul(2).saturating_add(1),
313
152
                max.and_then(|max| max.checked_mul(2))
314
152
                    .and_then(|max| max.checked_add(1)),
315
152
            )
316
        } else {
317
551
            (
318
551
                min.saturating_mul(2),
319
551
                max.and_then(|max| max.checked_mul(2)),
320
551
            )
321
        }
322
703
    }
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherIB1B_RShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2m_11Interpreter11read_memory12AccessOffsetB2a_EEB2a_EhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
Unexecuted instantiation: _RNvXs5_NtNtCseuYC0Zibziv_7smoldot4trie6nibbleINtB5_14BytesToNibblesINtNvNtB9_4util11as_ref_iter4IterINtCs1qmLyiTSqYF_6either6EitherRShINtNvMs5_NtNtNtB9_8executor2vm11interpreterNtB2h_11Interpreter11read_memory12AccessOffsetB25_EEhEENtNtNtNtCsaYZPK01V26L_4core4iter6traits8iterator8Iterator9size_hintCsibGXYHQB8Ea_25json_rpc_general_requests
323
}
324
325
impl<I: ExactSizeIterator<Item = u8>> ExactSizeIterator for BytesToNibbles<I> {}
326
327
#[cfg(test)]
328
mod tests {
329
    use super::{bytes_to_nibbles, Nibble, NibbleFromU8Error};
330
331
    #[test]
332
1
    fn nibble_try_from() {
333
1
        assert_eq!(u8::from(Nibble::try_from(0).unwrap()), 0);
334
1
        assert_eq!(u8::from(Nibble::try_from(1).unwrap()), 1);
335
1
        assert_eq!(u8::from(Nibble::try_from(15).unwrap()), 15);
336
337
1
        assert!(
matches!0
(
338
1
            Nibble::try_from(16),
339
            Err(NibbleFromU8Error::TooLarge)
340
        ));
341
1
        assert!(
matches!0
(
342
1
            Nibble::try_from(255),
343
            Err(NibbleFromU8Error::TooLarge)
344
        ));
345
1
    }
346
347
    #[test]
348
1
    fn from_ascii_hex_digit_works() {
349
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'0').unwrap()), 0);
350
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'9').unwrap()), 9);
351
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'a').unwrap()), 10);
352
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'f').unwrap()), 15);
353
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'A').unwrap()), 10);
354
1
        assert_eq!(u8::from(Nibble::from_ascii_hex_digit(b'F').unwrap()), 15);
355
1
        assert!(Nibble::from_ascii_hex_digit(b'j').is_none());
356
1
        assert!(Nibble::from_ascii_hex_digit(b' ').is_none());
357
1
        assert!(Nibble::from_ascii_hex_digit(0).is_none());
358
1
        assert!(Nibble::from_ascii_hex_digit(255).is_none());
359
1
    }
360
361
    #[test]
362
1
    fn bytes_to_nibbles_works() {
363
1
        assert_eq!(
364
1
            bytes_to_nibbles([].iter().cloned()).collect::<Vec<_>>(),
365
1
            &[]
366
1
        );
367
1
        assert_eq!(
368
1
            bytes_to_nibbles([1].iter().cloned()).collect::<Vec<_>>(),
369
1
            &[Nibble::try_from(0).unwrap(), Nibble::try_from(1).unwrap()]
370
1
        );
371
1
        assert_eq!(
372
1
            bytes_to_nibbles([200].iter().cloned()).collect::<Vec<_>>(),
373
1
            &[
374
1
                Nibble::try_from(0xc).unwrap(),
375
1
                Nibble::try_from(0x8).unwrap()
376
1
            ]
377
1
        );
378
1
        assert_eq!(
379
1
            bytes_to_nibbles([80, 200, 9].iter().cloned()).collect::<Vec<_>>(),
380
1
            &[
381
1
                Nibble::try_from(5).unwrap(),
382
1
                Nibble::try_from(0).unwrap(),
383
1
                Nibble::try_from(0xc).unwrap(),
384
1
                Nibble::try_from(0x8).unwrap(),
385
1
                Nibble::try_from(0).unwrap(),
386
1
                Nibble::try_from(9).unwrap()
387
1
            ]
388
1
        );
389
1
    }
390
391
    #[test]
392
1
    fn bytes_to_nibbles_len() {
393
1
        assert_eq!(bytes_to_nibbles([].iter().cloned()).len(), 0);
394
1
        assert_eq!(bytes_to_nibbles([1].iter().cloned()).len(), 2);
395
1
        assert_eq!(bytes_to_nibbles([200].iter().cloned()).len(), 2);
396
1
        assert_eq!(
397
1
            bytes_to_nibbles([1, 2, 3, 4, 5, 6].iter().cloned()).len(),
398
1
            12
399
1
        );
400
1
    }
401
}